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