Support full Lucene Query Parser syntax in $search
I’m looking to expose “power user” queries through our UI, but the queryString operator only works on string data types, and is somewhat too simplistic for this purpose.
Obviously, accepting raw user inputs and directly building a query from it is a security risk, but using something like queryString (which I do currently) seems like a safer and/or easier option.
I would like to see a new $search operator (perhaps "lucene" or "query") that accepts the full Lucene Query Parser Syntax.
-
Yi Wang commented
Our use case specifically needs the queryString query to support wildcard `?*` and fuzzy search `~` as Lucene does.
https://www.mongodb.com/community/forums/t/does-querystring-query-support-wildcard-and-fuzzy-search/180296