FileDocCategorySizeDatePackage
SimilarityDelegator.javaAPI DocApache Lucene 2.1.01955Wed Feb 14 10:46:40 GMT 2007org.apache.lucene.search

SimilarityDelegator

public class SimilarityDelegator extends Similarity
Expert: Delegating scoring implementation. Useful in {@link Query#getSimilarity(Searcher)} implementations, to override only certain methods of a Searcher's Similiarty implementation..

Fields Summary
private Similarity
delegee
Constructors Summary
public SimilarityDelegator(Similarity delegee)
Construct a {@link Similarity} that delegates all methods to another.

param
delegee the Similarity implementation to delegate to

    this.delegee = delegee;
  
Methods Summary
public floatcoord(int overlap, int maxOverlap)

    return delegee.coord(overlap, maxOverlap);
  
public floatidf(int docFreq, int numDocs)

    return delegee.idf(docFreq, numDocs);
  
public floatlengthNorm(java.lang.String fieldName, int numTerms)

    return delegee.lengthNorm(fieldName, numTerms);
  
public floatqueryNorm(float sumOfSquaredWeights)

    return delegee.queryNorm(sumOfSquaredWeights);
  
public floatsloppyFreq(int distance)

    return delegee.sloppyFreq(distance);
  
public floattf(float freq)

    return delegee.tf(freq);