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

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

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

      > 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:
            rassi J Rassi
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: