OR statement in MongoDB Compass
Consider:
In MongoDB Compass, I want to search a collection for the word "LLC" in both the ownerName and ownerStreet properties (I don't have a text index.) I started with:
{ownerName: {$regex: / LLC/i}}
which gives 3043 results.
However, using:
{ownerName: {$regex: RegExp(' LLC')},ownerStreet: {$regex: RegExp(' LLC')}}
gives only 100.
Meaning this is an AND statement, not an OR.
How do I use an OR statement filter in compass?
