public MyWeight(Searcher searcher) throws IOException {
   this.similarity = getSimilarity(searcher);
   idf = similarity.idf(term, searcher);
 }
Exemple #2
0
 @Override
 public double calculate(int tf, int df, int length, int numDocs) {
   // ignore length
   return sim.tf(tf) * sim.idf(df, numDocs);
 }