开发者

Thinking sphinx not rendering results in order of 'relevance'

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜