org.apache.nutch.indexer
Class NutchSimilarity

java.lang.Object
  extended by org.apache.lucene.search.Similarity
      extended by org.apache.lucene.search.DefaultSimilarity
          extended by org.apache.nutch.indexer.NutchSimilarity
All Implemented Interfaces:
Serializable

public class NutchSimilarity
extends DefaultSimilarity

Similarity implementatation used by Nutch indexing and search.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.lucene.search.DefaultSimilarity
discountOverlaps
 
Fields inherited from class org.apache.lucene.search.Similarity
NO_DOC_ID_PROVIDED
 
Constructor Summary
NutchSimilarity()
           
 
Method Summary
 float coord(int overlap, int maxOverlap)
           
 float lengthNorm(String fieldName, int numTokens)
          Normalize field by length.
 
Methods inherited from class org.apache.lucene.search.DefaultSimilarity
computeNorm, getDiscountOverlaps, idf, queryNorm, setDiscountOverlaps, sloppyFreq, tf
 
Methods inherited from class org.apache.lucene.search.Similarity
decodeNorm, encodeNorm, getDefault, getNormDecoder, idfExplain, idfExplain, scorePayload, setDefault, tf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NutchSimilarity

public NutchSimilarity()
Method Detail

lengthNorm

public float lengthNorm(String fieldName,
                        int numTokens)
Normalize field by length. Called at index time.

Overrides:
lengthNorm in class DefaultSimilarity

coord

public float coord(int overlap,
                   int maxOverlap)
Overrides:
coord in class DefaultSimilarity


Copyright © 2006 The Apache Software Foundation