MongoDB全文搜索是否不区分大小写?

时间:2013-12-01 16:39:53

标签: mongodb full-text-search fulltext-index

以下文档(http://docs.mongodb.org/manual/tutorial/search-for-text/)文本索引必须不区分大小写。 但正如我所见:

> db.procedures2.runCommand("text",{project:{_id:1}, 
      search:"иркутск",language:"russian",limit:1})**

{
"queryDebugString" : "иркутск||||||",
"language" : "russian",
"results" : [ ],
"stats" : {
    "nscanned" : 0,
    "nscannedObjects" : 0,
    "n" : 0,
    "nfound" : 0,
    "timeMicros" : 170
},
"ok" : 1
}
找不到任何东西


> db.procedures2.runCommand("text",{project:{_id:1}, 
    search:"Иркутск",language:"russian",limit:1})**

{
"queryDebugString" : "Иркутск||||||",
"language" : "russian",
"results" : [
    {
        "score" : 0.984375,
        "obj" : {
            "_id" : ObjectId("5299b9635497c868430266a0")
        }
    }
],
"stats" : {
    "nscanned" : 163,
    "nscannedObjects" : 0,
    "n" : 1,
    "nfound" : 1,
    "timeMicros" : 596
},
"ok" : 1
}

找到1条记录。

为什么?

0 个答案:

没有答案