Is it possible to use search to match on an exact phrase?
For example, say I want to query a movie database for the title of “Red”. There are lots of movies I’d have to parse through that contain the word “red”. I just want the exact phrase.
I could just do something like db.movies.find({title: "Red"})
but suppose there is no index on title, but there is a search index. Can I make use of the search index with an exact match like that?
I would assume I could do it with regex, but I noticed that ^
and $
are not supported.