getting similarity score in Solr

lucene, solr

Solution

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.

Problem

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?

Original source

Related problems