0
A
回答
0
http://docs.mongodb.org/manual/core/text-search/可能会对您感兴趣。这在MongoDB 2.4中是新的,它包含对文本索引的支持。看起来,这是目前的一项测试功能。
0
以下Query将从数据库表coulmn值中提取确切的单词$ term。
SELECT * FROM sometable WHERE somefield LIKE '% $term %' OR somefield LIKE '$term %' OR somefield LIKE '% $term'
+0
这不是我的意思,1)这不是MongoDB的语法,2)它在40GB文本的大型数据库中非常慢,3)我正在寻找某种索引 – 2013-04-27 00:01:34
http://stackoverflow.com/questions/3305561/how-to-query-mongodb-with-like/3305687#3305687 – WiredPrairie 2013-04-27 00:02:17
或尝试全文搜索引擎解决方案,如Solr或ElasticSearch – WiredPrairie 2013-04-27 00:02:39
我怎么知道哪一个最适合MongoDB – 2013-04-27 00:18:05