Class DFRSimilarityFactory
java.lang.Object
org.apache.solr.schema.SimilarityFactory
org.apache.solr.search.similarities.DFRSimilarityFactory
Factory for
DFRSimilarity
You must specify the implementations for all three components of DFR (strings). In general the models are parameter-free, but two of the normalizations take floating point parameters (see below):
basicModel: Basic model of information content:G: Geometric approximation of Bose-EinsteinI(n): Inverse document frequencyI(ne): Inverse expected document frequency [mixture of Poisson and IDF]I(F): Inverse term frequency [approximation of I(ne)]
afterEffect: First normalization of information gain:L: Laplace's law of successionB: Ratio of two Bernoulli processes
normalization: Second (length) normalization:H1: Uniform distribution of term frequency- parameter c (float): hyper-parameter that controls the term frequency
normalization with respect to the document length. The default is
1
- parameter c (float): hyper-parameter that controls the term frequency
normalization with respect to the document length. The default is
H2: term frequency density inversely related to length- parameter c (float): hyper-parameter that controls the term frequency
normalization with respect to the document length. The default is
1
- parameter c (float): hyper-parameter that controls the term frequency
normalization with respect to the document length. The default is
H3: term frequency normalization provided by Dirichlet prior- parameter mu (float): smoothing parameter μ. The default is
800
- parameter mu (float): smoothing parameter μ. The default is
Z: term frequency normalization provided by a Zipfian relation- parameter z (float): represents
A/(A+1)where A measures the specificity of the language. The default is0.3
- parameter z (float): represents
none: no second normalization
Optional settings:
- discountOverlaps (bool): Sets
Similarity.getDiscountOverlaps()
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields inherited from class org.apache.solr.schema.SimilarityFactory
CLASS_NAME, params -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.similarities.Similarityvoidinit(org.apache.solr.common.params.SolrParams params) Methods inherited from class org.apache.solr.schema.SimilarityFactory
getClassArg, getNamedPropertyValues, getParams
-
Constructor Details
-
DFRSimilarityFactory
public DFRSimilarityFactory()
-
-
Method Details
-
init
public void init(org.apache.solr.common.params.SolrParams params) - Overrides:
initin classSimilarityFactory
-
getSimilarity
public org.apache.lucene.search.similarities.Similarity getSimilarity()- Specified by:
getSimilarityin classSimilarityFactory
-