Is it possible to find documents by second field if not found by first field?
For example:
In a document we have “productName” and “brand” fields:
[
{ productName: "red box", brand: "tiny boxes" },
{ productName: "green box", brand: "tiny boxes" },
{ productName: "red blue box", brand: "big boxes" },
]
First scenario: Search string is “red”. It must return two objects.
Second scenario: Search string is “big”. It must return one object.