[SERVER-8126] Text indexes with array partition field aren't indexed as multi-key Created: 09/Jan/13  Updated: 11/Jul/16  Resolved: 14/Jan/13

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: None
Fix Version/s: 2.4.0-rc0

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

Operating System: ALL
Participants:

 Description   

Works as designed?

> db.foo.ensureIndex({partition:1, a:"text"})
> db.foo.insert({a:"word",partition:[0,1]})
> db.foo.runCommand("text",{search:"word",filter:{partition:0}})
{
	"queryDebugString" : "word||||||",
	"language" : "english",
	"results" : [ ],
	"stats" : {
		"nscanned" : 0,
		"nscannedObjects" : 0,
		"n" : 0,
		"timeMicros" : 91
	},
	"ok" : 1
}
> db.foo.runCommand("text",{search:"word",filter:{partition:[0,1]}})
{
	"queryDebugString" : "word||||||",
	"language" : "english",
	"results" : [
		{
			"score" : 1.1,
			"obj" : {
				"_id" : ObjectId("50edc79c408f7fa6a0a2c9ee"),
				"a" : "word",
				"partition" : [
					0,
					1
				]
			}
		}
	],
	"stats" : {
		"nscanned" : 1,
		"nscannedObjects" : 1,
		"n" : 1,
		"timeMicros" : 98
	},
	"ok" : 1
}
> 



 Comments   
Comment by auto [ 14/Jan/13 ]

Author:

{u'date': u'2013-01-14T15:54:30Z', u'email': u'eliot@10gen.com', u'name': u'Eliot Horowitz'}

Message: SERVER-8126: don't allow an array as a prefix of a text index
Branch: master
https://github.com/mongodb/mongo/commit/8af04aac6b443b448b4bad7f97e6ae28aebce95a

Comment by Eliot Horowitz (Inactive) [ 09/Jan/13 ]

should error out

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