有没有办法通过Mongoid使用MongoDB(v 2.4)的全文搜索功能?我试着从google group link得到答案,但不断收到以下错误。使用Mongoid进行全文搜索
在一个标签,我开始的mongod这样:~$ mongod --setParameter textSearchEnabled=true
导致错误的代码行: Article.mongo_session.command({:text => {:search => 'Ruby'}})
这将是巨大的,如果有人能指出一个方式在Ruby中执行MongoDB的runCommand
,让我可以直接运行命令db.collection.runCommand("text", { search: <string> })
failed with error 13111: "exception: wrong type for field (text) 3 != 2"
See https://github.com/mongodb/mongo/blob/master/docs/errors.md
for details about this error.
你可以发布导致错误的行吗? – MervS 2013-04-30 06:28:34
请参阅更新后的帖子。 – brayne 2013-04-30 18:19:41