You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But this gives me no items back... There is a 2 year old issue where others also couldn't solve this.
Probably this might be a bug inside the backend, maybe here:
Hi @Gyurmatag
I encountered the same issue and found that the query isn't returning results when trying to filter by payloads.nationalities as expected.
After testing, I used the query structure like this:
{ "query": nationality ? { "payloads.nationalities": { $in: [nationality] } } : {}, "options": { "sort": { "date_utc": -1 }, "page": 1, "limit": 10, "populate": ["payloads"] } }
However, even with this structure, no results were returned.
A possible reason could be that the payloads.nationalities field is an array, and there might be issues when querying for a single value without checking for the array structure properly. Also, date_utc sorting may be another issue, depending on how the data is formatted and stored.
I recommend:
Test the query without sorting to check if the issue is with the sorting logic: { "query": nationality ? { "payloads.nationalities": { $in: [nationality] } } : {}, "options": { "page": 1, "limit": 10, "populate": ["payloads"] } }
Check for valid data in the payloads.nationalities field. Ensure that the array contains the correct nationality format and matches the query.
It might also help to review the backend query logic where Launch.paginate is invoked, as there could be issues with how the query is transformed and passed to MongoDB.
Also, you may have a look over following screenshots...I queried for sample data.
I want to filter for the nationalities in the "launches" query like this:
But this gives me no items back... There is a 2 year old issue where others also couldn't solve this.
Probably this might be a bug inside the backend, maybe here:
or somewhere in the
_transform-query.js
fileDoes anybody has any idea on this? How we can solve it?
Thank you very much!
The text was updated successfully, but these errors were encountered: