Can I use other similarity class?

118 Views Asked by At

I'm trying to configure schema.xml included in blank-example-solr-config.zip. I found the schema.xml has the following line:

<similarity class="org.apache.lucene.search.similarities.LMDirichletSimilarity"/>

Is it necessary to use this similarity class or can I use other class such as BM25SimilarityFactory and TFIDFSimilarity?

1

There are 1 best solutions below

1
On

You're welcome to change the Similarity class as you'd like. Either of the alternatives you mentioned above would work.

However if you're making use of the Ranker or /fcselect endpoint, you may find that using other Similarity classes results in suboptimal results. They do work with other Similarity implementations, but the best results have been seen with LMDirichletSimilarity.

But you're probably in the best position to determine whether that possible tradeoff affects your specific usage.