Hello there,
I’m trying to implement a simple search function into our app that retrieves its content from Dato.
We might need a more powerful way of searching later, but to begin with I want to filter a title and content field based on a given search term and return all entries that match the keyword on ANY of them.
I tried following this example:
and build the following filter:
{OR: {shoeDescription: {matches: {pattern: “Nike”, caseSensitive: “false”}}, entryTitle: {matches: {pattern: “Nike”, caseSensitive: “false”}}}}
which in my understanding should return all entries that match “Nike” on the “entryTitle” AND/OR “shoeDescription”. But this isn’t the case. It returns 0 entries on my tests (only 1 available entry, which has only “nike” in the entryTitle but nothing in the shoeDescription).
If I add “nike” to the “shoeDescription” as well, the entry gets returned. How do I specifiy, that only one of the OR-filters need to hit, to end in a result?
Thanks a lot
Florian,