Class ClassicSimilarityFactory
- java.lang.Object
-
- org.apache.solr.schema.SimilarityFactory
-
- org.apache.solr.search.similarities.ClassicSimilarityFactory
-
- Direct Known Subclasses:
SweetSpotSimilarityFactory
public class ClassicSimilarityFactory extends SimilarityFactory
Factory forClassicSimilarity
ClassicSimilarity is Lucene's original scoring implementation, based upon the Vector Space Model.
Optional settings:
- discountOverlaps (bool): Sets
TFIDFSimilarity.setDiscountOverlaps(boolean)
- See Also:
TFIDFSimilarity
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DISCOUNT_OVERLAPS
Init param name for specifying the value to use inTFIDFSimilarity.setDiscountOverlaps(boolean)
protected boolean
discountOverlaps
Controls the value ofTFIDFSimilarity.setDiscountOverlaps(boolean)
on newly constructed instances ofClassicSimilarity
-
Fields inherited from class org.apache.solr.schema.SimilarityFactory
CLASS_NAME, params
-
-
Constructor Summary
Constructors Constructor Description ClassicSimilarityFactory()
-
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
-
-
-
-
Field Detail
-
DISCOUNT_OVERLAPS
public static final String DISCOUNT_OVERLAPS
Init param name for specifying the value to use inTFIDFSimilarity.setDiscountOverlaps(boolean)
- See Also:
- Constant Field Values
-
discountOverlaps
protected boolean discountOverlaps
Controls the value ofTFIDFSimilarity.setDiscountOverlaps(boolean)
on newly constructed instances ofClassicSimilarity
-
-
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
-
-