开发者

Thinking sphinx not rendering results in order of 'relevance'

开发者 https://www.devze.com 2023-01-01 17:09 出处:网络
Thinking sphinx documentation says that it automatically sorts the results based on relevance. What is its relevance metric ? How can we define our own relevance metric for the system ?

Thinking sphinx documentation says that it automatically sorts the results based on relevance. What is its relevance metric ? How can we define our own relevance metric for the system ?

Example : I have a db in which one entry is Windows XP & it contains a reference to Microsoft. I also have an entry for Microsoft 开发者_Python百科itself. So when I query Microsoft , I should get Microsoft result first & then the XP one. But I get XP result first & then of Microsoft.

Any help would be greatly appreciated. :)


Try :expr sorting mode. This is probably what you want.

If you really need to choose another relevance metric (and understand difference between relevance and sort order), there are few metrics you can choose from. I was able to select ranking mode from rails console when I was experimenting. I can't recall how, but it was nothing complicated.

0

精彩评论

暂无评论...
验证码 换一张
取 消