SOLR Relevance Sorting
I am using SOLR 3.1. but I feel that "Relevance Sorting" is not working properly. I read that if we are not sorting then by default SOLR use "Relevance Sort" for that. So, I am not giving any sorting.
Shouldn't "Relevance Sort" work? I have tried to give So开发者_StackOverflow中文版rting like this as well
key_words_new:"Software Engineer"&sort=score desc
key_words_new:"Software Engineer"&sort=score asc
But I can not see any change in the order.
Then I tried to display Score. Of course that would help me out to sort the problem. I was trying to display score like this
key_words_new:"Software Engineer"&fl=*,score
Shouldn't it display score field as well? I can't see any change in the result. There is no score field for me.
Can anybody help me out please.
You need to add this fl
parameter to the URL(GET parameter if GET is used) thats important. The field should show up then.
A second thing is scoring is based on the similarity algorithm used. If you didnt specify anything custom the default algorithm will be used. From your post it seems like you are specifying only a field which takes a "constant" string. This would also result in something like a Frequency of 1 in this document. If the string represents the complete value in this field. So every field will score the same so it does not make a difference.
Actually one example to see differences in score is. You take one document with a text field holding some random text(20 words with random values) with one word e.g. "sometest". And you take a second document with only the word "sometest" in this text field.
Another thing which has an influence will be how often a word occurs in the text as well as IDF if it is applied to the field.
精彩评论