Reputation: 1094
How can I get similarity score between the query and each of retrieved documents in Solr?
Furthermore, how can I set Solr retrieval method? For example, chose between Vector Space model or Document Language Model.
Is it possible?
Upvotes: 8
Views: 11419
Reputation: 2225
As you mentioned in your own answer, you can specify Solr you want to retrieve the score of every document using fl=*, score
. You can see it reading this documentation
First of all, Lucene/Solr, only provides TF-IDF (VSM based) scoring strategy. If you decided to plug-in third party Similarity implementations, you can change the scoring strategy used by Solr, but you can't change it in query basis. In fact, you need to reload the core to change it.
Upvotes: 12
Reputation: 1094
as mentioned here https://stackoverflow.com/a/9262300/1593370
you can add score field to the result by adding fl=*,score
to your request.
but I still cant find a way to chose the retrieval method.
Upvotes: 1