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

Text indexes with array partition field aren't indexed as multi-key

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

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

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: