org.apache.solr.search.similarities
Class SchemaSimilarityFactory
java.lang.Object
org.apache.solr.schema.SimilarityFactory
org.apache.solr.search.similarities.SchemaSimilarityFactory
- All Implemented Interfaces:
- SchemaAware
public class SchemaSimilarityFactory
- extends SimilarityFactory
- implements SchemaAware
SimilarityFactory that returns a PerFieldSimilarityWrapper
that delegates to the field type, if its configured, otherwise
DefaultSimilarity.
NOTE: Users should be aware that in addition to supporting
Similarity configurations specified on individual
field types, this factory also differs in behavior from
DefaultSimilarityFactory because of other differences in the
implementations of PerFieldSimilarityWrapper and
DefaultSimilarity - notably in methods such as
Similarity.coord(int, int) and Similarity.queryNorm(float).
- See Also:
FieldType.getSimilarity()
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchemaSimilarityFactory
public SchemaSimilarityFactory()
inform
public void inform(IndexSchema schema)
- Description copied from interface:
SchemaAware
- Informs the
IndexSchema provided by the schema
parameter of an event (e.g., a new FieldType was added, etc.
- Specified by:
inform in interface SchemaAware
- Parameters:
schema - The IndexSchema instance that inform of the update to.
getSimilarity
public Similarity getSimilarity()
- Specified by:
getSimilarity in class SimilarityFactory
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.