|
Same thing happens with remove:
> db.test.find({$text: {$search: "dog"}})
|
{ "_id" : 1, "words" : "dog" }
|
{ "_id" : 4, "words" : "dog cat cat", "num" : 2, "loc" : [ 40, 40 ] }
|
{ "_id" : 3, "words" : "dog cat cat", "num" : 1, "loc" : [ 20, 20 ] }
|
{ "_id" : 2, "words" : "dog cat" }
|
> db.test.remove({$text: {$search: "dog"}})
|
SingleWriteResult({
|
"writeErrors" : [ ],
|
"writeConcernErrors" : [ ],
|
"nInserted" : 0,
|
"nUpserted" : 0,
|
"nUpdated" : 0,
|
"nModified" : 0,
|
"nRemoved" : 2,
|
"upserted" : [ ]
|
})
|
> db.test.find({$text: {$search: "dog"}})
|
{ "_id" : 4, "words" : "dog cat cat", "num" : 2, "loc" : [ 40, 40 ] }
|
{ "_id" : 2, "words" : "dog cat" }
|
|