org.apache.solr.search.similarities
Class SchemaSimilarityFactory

java.lang.Object
  extended by org.apache.solr.schema.SimilarityFactory
      extended by 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()

Field Summary
 
Fields inherited from class org.apache.solr.schema.SimilarityFactory
params
 
Constructor Summary
SchemaSimilarityFactory()
           
 
Method Summary
 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.
 
Methods inherited from class org.apache.solr.schema.SimilarityFactory
getParams, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaSimilarityFactory

public SchemaSimilarityFactory()
Method Detail

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-2013 Apache Software Foundation. All Rights Reserved.