views:

139

answers:

1

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 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. :)

+1  A: 

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.

skalee