Allow $match syntax in $search queries
Currently, I am re-writing my queries that were previously using $match + $text queries using $search + compound. Firstly, this is a fair bit of work depending on the number of match clauses etc. Secondly, not all the operators that $match supports are supported inside $search/compound clauses causing product differences.
Anything that would speed up migrating $match queries to use $search while maintaining query results would help take advantage of the $search capabilities without having to rework the entire query logic.
As a side note, I'm aware that $match can follow a $search stage, but unfortunately this is really not performant as the $match stage is unable to use any of the native indices as confirmed by the documentation. There is another idea around allow $match to go before $search (which is great, I've upvoted). That could also help with this request as long as the performance can be figured out while handing off from the $match stage to the $search stage.
![](https://secure.gravatar.com/avatar/ebf5bd5767ae91d60e79f776b9979cd0?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Prasad Kini commented
Support for $match syntax would be an awesome addition to Atlas Search