[SERVER-12325] Text index omits data in subdocuments if exact path to subdocument also indexed Created: 10/Jan/14  Updated: 11/Jul/16  Resolved: 24/Jan/14

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: 2.5.3
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: J Rassi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

> 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.



 Comments   
Comment by Githook User [ 24/Jan/14 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-12325 Fix FTSSpec traversal logic for subdocuments

Fixed issue where FTSSpec::scoreDocument() would stop deep traversal
of a document when it encountered a weight for the FTSSpec with a
non-String BSON type which also happens to be a parent component of
another weight.
Branch: master
https://github.com/mongodb/mongo/commit/f03c5b1f6163be5de62b38294deeab310969a4ac

Generated at Thu Feb 08 03:28:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.