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