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

for 3.2, text search with languages use the wrong text index version (2 instead of 3)

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc1
    • Affects Version/s: None
    • Component/s: Querying, Text Search
    • Labels:
      None
    • Fully Compatible
    • Platform A (10/09/15), Platform B (10/30/15)

      So, if I have a collection foo with the text index:

      db.foo.createIndex( { x: "text" }, { default_language: "french" } )
      

      and the collection has the following documents

      > db.foo.find()
      { "_id" : ObjectId("5617cdea6201ba0ae25c192d"), "x" : "répondez" }
      { "_id" : ObjectId("5617ce146201ba0ae25c192e"), "x" : "répondez", "language" : "fr" }
      { "_id" : ObjectId("5617d32e6201ba0ae25c192f"), "x" : "répondez", "language" : "fr" }
      { "_id" : ObjectId("5617d6456201ba0ae25c1930"), "x" : "répondez", "language" : "french" }
      { "_id" : ObjectId("5617d65d6201ba0ae25c1931"), "x" : "réponder", "language" : "french" }
      

      But the $text search only finds one document:

      > db.foo.find( { $text: {$search: "réponder", $language: "fr"} } )
      { "_id" : ObjectId("5617cdea6201ba0ae25c192d"), "x" : "répondez" }
      

      Whereas in v3.0.5, it would find all of them

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: