如何在狮身人面像RT查询中包含排名类型(例如SPH_RANK_NONE(?
select id from my_index where match('hello')
order by date
limit 600 ;
另外,有没有办法只设置一次,例如在配置文件中?
狮身人面像文档:http://sphinxsearch.com/blog/2010/08/17/how-sphinx-relevance-ranking-works/
默认排名模式为 SPH_RANK_PROXIMITY_BM25
,无法使用 config 进行更改。
这是为查询设置排名模式的方式(请注意,ORDER BY
必须具有显式ASC
/DESC
顺序子句(:
SELECT id FROM my_index where MATCH('hello')
ORDER BY date DESC LIMIT 600 OPTION ranker=sph04;
文档中的相关部分:
http://sphinxsearch.com/docs/current.html#weightinghttp://sphinxsearch.com/docs/current.html#sphinxql-select