Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-24221

When using phrases in text search other individual terms are not respected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 3.2.6
    • Fix Version/s: None
    • Component/s: Text Search
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      db.getCollection('tests').drop()
      db.getCollection('tests').createIndex({ someText: "text" })
      db.getCollection('tests').insert({ someText: "ssl certificate authority key" })
      db.getCollection('tests').find({ $text: { $search: "\"ssl certificate\" authority key" } }) // found one - as expected
      db.getCollection('tests').find({ $text: { $search: "\"ssl certificate\" mongodb regex" } }) // found one - same as above - not as expected
      

      Show
      db.getCollection('tests').drop() db.getCollection('tests').createIndex({ someText: "text" }) db.getCollection('tests').insert({ someText: "ssl certificate authority key" }) db.getCollection('tests').find({ $text: { $search: "\"ssl certificate\" authority key" } }) // found one - as expected db.getCollection('tests').find({ $text: { $search: "\"ssl certificate\" mongodb regex" } }) // found one - same as above - not as expected

      Description

      When specifying a text search such as "\"ssl certificate\" authority key"
      the individual terms "authority" and "key" is not respected as per the docs.

      The $text operator searches for the phrase "ssl certificate" and ("authority" or "key" or "ssl" or "certificate" ).

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: