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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.3
    • Component/s: Text Search
    • None
    • ALL
    • 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.

          Assignee:
          Unassigned Unassigned
          Reporter:
          jakub.rutkowski.ca@gmail.com Jakub Rutkowski
          Votes:
          0 Vote for this issue
          Watchers:
          4 Start watching this issue

            Created:
            Updated:
            Resolved: