public class SchemaSimilarityFactory extends SimilarityFactory implements SchemaAware
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)
.
FieldType.getSimilarity()
CLASS_NAME, params
Constructor and Description |
---|
SchemaSimilarityFactory() |
Modifier and Type | Method and Description |
---|---|
Similarity |
getSimilarity() |
void |
inform(IndexSchema schema)
Informs the
IndexSchema provided by the schema
parameter of an event (e.g., a new FieldType was added, etc. |
getClassArg, getNamedPropertyValues, getParams, init
public void inform(IndexSchema schema)
SchemaAware
IndexSchema
provided by the schema
parameter of an event (e.g., a new FieldType
was added, etc.inform
in interface SchemaAware
schema
- The IndexSchema
instance that inform of the update to.public Similarity getSimilarity()
getSimilarity
in class SimilarityFactory
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.