Class BM25SimilarityFactory
- java.lang.Object
-
- org.apache.solr.schema.SimilarityFactory
-
- org.apache.solr.search.similarities.BM25SimilarityFactory
-
public class BM25SimilarityFactory extends SimilarityFactory
Factory for BM25Similarity. This is the default similarity since 8.x.Parameters:
- k1 (float): Controls non-linear term frequency normalization (saturation). The default is
1.2
- b (float): Controls to what degree document length normalizes tf values. The default is
0.75
- discountOverlaps (bool): True if overlap tokens (tokens with a position of increment of
zero) are discounted from the document's length. The default is
true
- Since:
- 8.0.0
- WARNING: This API is experimental and might change in incompatible ways in the next release.
- k1 (float): Controls non-linear term frequency normalization (saturation). The default is
-
-
Field Summary
-
Fields inherited from class org.apache.solr.schema.SimilarityFactory
CLASS_NAME, params
-
-
Constructor Summary
Constructors Constructor Description BM25SimilarityFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.search.similarities.Similarity
getSimilarity()
void
init(org.apache.solr.common.params.SolrParams params)
-
Methods inherited from class org.apache.solr.schema.SimilarityFactory
getClassArg, getNamedPropertyValues, getParams
-
-
-
-
Method Detail
-
init
public void init(org.apache.solr.common.params.SolrParams params)
- Overrides:
init
in classSimilarityFactory
-
getSimilarity
public org.apache.lucene.search.similarities.Similarity getSimilarity()
- Specified by:
getSimilarity
in classSimilarityFactory
-
-