Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
4.2.15
-
None
-
None
-
ALL
Description
I am using $text $search between double quotes to search Star System names in my database(~4.5milion records). The problem is that the query planner splits my search string into two terms (TRAPPIST and 1) and performs a full scan of the collection (which has a lot of names with xxx-xxx-1 in it) and the query goes over the 20 second timeout set for the web service accessing the database.
It should be an instant find of 1 document, but the query planner goes through all those "1" documents for nothing.
"$text" : { "$search" : "\"TRAPPIST-1\"" }
Check my attached query planner, it has two IXSCANs and the terms are split into ["1","TRAPPIST"].
For a scan of the text TRAPPIST (no "-1") there is only one term and one IXSCAN and the query finishes in ~200ms.