Query Planner splits search string in terms even if it's between quotes

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.2.15
    • Component/s: None
    • None
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

       

            Assignee:
            Edwin Zhou
            Reporter:
            rayden hayden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: