Hi all!
Is there a way to perform a OR query using predicates? Let’s say I have a category field which is a content relationship, and a subcategory field which is also a content relationship. How would you query all articles that have category=xyz OR subcategory=xyz ? seems like the only solution is to perform 2 calls in parallel and merge the responses together.
Unfortunately as you've discovered there is no way currently to do this sort of query. The only workaround is the one you suggested: making 2 separate queries and combining the results.
I've submitted this to our Product team as a feature request to possibly work on in the future. There is no guarantee this feature will be implemented, though. Your post ensures that the idea is put on the table and discussed. If/when we have information to communicate about this idea, we will do it here in this thread.
Thanks again for your feedback
1 Like
system
(system)
closed as resolved, flag & select 'Something Else' to reopen.
5
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
Sorry about the long delay, the vacation season made getting information difficult.
So I talked with Levi and the trick here would be to get all the results for both your queries when you query the documents. So instead of just 20 of each, you would get everything and then concatenate the results.
From there with your new result list, you would build your own pagination in your application. Unfortunately, I don't have any direct code examples for this, but here is a React project that includes pagination that might help