Text index omits data in subdocuments if exact path to subdocument also indexed

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.5
    • Affects Version/s: 2.5.3
    • Component/s: Text Search
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.foo.insert({a:{b:"hello"}})
      > db.foo.ensureIndex({"a.b":"text"})
      > db.foo.validate().keysPerIndex
      { "test.foo.$_id_" : 1, "test.foo.$a.b_text" : 1 } // correct: 1 entry in text index
      > db.foo.dropIndexes()
      {
      	"nIndexesWas" : 2,
      	"msg" : "non-_id indexes dropped for collection",
      	"ok" : 1
      }
      > db.foo.ensureIndex({"a.b":"text", a:"text"}) // now index "a" in addition
      > db.foo.validate().keysPerIndex
      { "test.foo.$_id_" : 1, "test.foo.$a.b_text_a_text" : 0 } // incorrect: 0 entries in text index
      

      Regression introduced in 2.5.3.

            Assignee:
            J Rassi (Inactive)
            Reporter:
            J Rassi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: