org.apache.solr.schema
Class SimilarityFactory
java.lang.Object
org.apache.solr.schema.SimilarityFactory
- Direct Known Subclasses:
- BM25SimilarityFactory, DefaultSimilarityFactory, DFRSimilarityFactory, IBSimilarityFactory, LMDirichletSimilarityFactory, LMJelinekMercerSimilarityFactory, SchemaSimilarityFactory
public abstract class SimilarityFactory
- extends Object
A factory interface for configuring a Similarity
in the Solr
schema.xml.
Subclasses of SimilarityFactory
which are SchemaAware
must take responsibility for either consulting the similarities configured
on individual field types, or generating appropriate error/warning messages
if field type specific similarities exist but are being ignored. The
IndexSchema
will provide such error checking if a
non-SchemaAware
instance of SimilarityFactory
is used.
- See Also:
FieldType.getSimilarity()
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS_NAME
public static final String CLASS_NAME
- See Also:
- Constant Field Values
params
protected SolrParams params
SimilarityFactory
public SimilarityFactory()
init
public void init(SolrParams params)
getParams
public SolrParams getParams()
getSimilarity
public abstract Similarity getSimilarity()
getNamedPropertyValues
public SimpleOrderedMap<Object> getNamedPropertyValues()
- Returns a serializable description of this similarity(factory)
getClassArg
public String getClassArg()
- Returns:
- the string used to specify the concrete class name in a serialized representation: the class arg.
If the concrete class name was not specified via a class arg, returns
getClass().getName()
,
unless this class is the anonymous similarity wrapper produced in IndexSchema
, in which
case the getSimilarity().getClass().getName()
is returned.
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.