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

Text search doesn't work properly if query contains word "OTHER"

    XMLWordPrintable

    Details

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

      1. Create sample collection: test
      2. Create sample text index:

      db.getCollection('test').createIndex( { name: "text" } )
      

      3. Feed collection with some documents:

      {
          "_id" : ObjectId("58230e1a2061b3081d657f3f"),
          "name" : "1"
      }
      {
          "_id" : ObjectId("58230f972061b3081d657f40"),
          "name" : "TEST OTHER"
      }
      {
          "_id" : ObjectId("58230f9d2061b3081d657f41"),
          "name" : "TEST OTHERS"
      }
      {
          "_id" : ObjectId("582310352061b3081d657f42"),
          "name" : "OTHER"
      }
      

      4. Do search request with "OTHER" keyword

      db.getCollection('test').find({ $text: { $search: "OTHER" } })
      

      There are no documents returned. If word "OTHER" was changed to "OTHERS" - everything is ok - 1 document returned.

      Show
      1. Create sample collection: test 2. Create sample text index: db.getCollection( 'test' ).createIndex( { name: "text" } ) 3. Feed collection with some documents: { "_id" : ObjectId( "58230e1a2061b3081d657f3f" ), "name" : "1" } { "_id" : ObjectId( "58230f972061b3081d657f40" ), "name" : "TEST OTHER" } { "_id" : ObjectId( "58230f9d2061b3081d657f41" ), "name" : "TEST OTHERS" } { "_id" : ObjectId( "582310352061b3081d657f42" ), "name" : "OTHER" } 4. Do search request with "OTHER" keyword db.getCollection( 'test' ).find({ $text: { $search: "OTHER" } }) There are no documents returned. If word "OTHER" was changed to "OTHERS" - everything is ok - 1 document returned.

      Attachments

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved: