搜索引擎 sphinx 搜 Article 里 title 匹配 dog 超过 2 次的所有文章

xinhua · April 07, 2012 · Last by allenwei replied at April 07, 2012 · 6904 hits

大家好,我有一个模型 Article, 有一个索引字段比如叫 title 现在我想搜所有 Article 里 title 包含 dog 超过 2 次的所有文章。

我试图这么搜,

·Article.search "@title dog dog" , match_mode => :extended2 ·

结果不对,我这样的需求能实现么?有经验的同学希望分享一下,感激不尽。

这里是官方文档,很多语法你可以尝试一下

http://sphinxsearch.com/docs/1.10/extended-syntax.html

You need to Sign in before reply, if you don't have an account, please Sign up first.