public float tf(float freq) { return delegee.tf(freq); }
public float tf(float freq) { return delegee.tf(freq); }
public float score() throws IOException { int f = freqs[pointer]; float raw = // compute tf(f)*weight f < SCORE_CACHE_SIZE // check cache ? scoreCache[f] // cache hit : getSimilarity().tf(f)*weightValue; // cache miss return raw * Similarity.decodeNorm(norms[doc]); // normalize for field }
public float score() throws IOException { //System.out.println("scoring " + first.doc); float raw = getSimilarity().tf(freq) * value; // raw score return raw * Similarity.decodeNorm(norms[first.doc]); // normalize }
public float score() throws IOException { float raw = getSimilarity().tf(freq) * value; // raw score return raw * Similarity.decodeNorm(norms[doc]); // normalize }
public float score() { int f = freqs[pointer]; float raw = // compute tf(f)*weight f < SCORE_CACHE_SIZE // check cache ? scoreCache[f] // cache hit : getSimilarity().tf(f)*weightValue; // cache miss return raw * Similarity.decodeNorm(norms == null ? DEFAULT_NORM : norms[doc]); // normalize for field }
public float score() throws IOException { //System.out.println("scoring " + first.doc); float raw = getSimilarity().tf(freq) * value; // raw score return raw * Similarity.decodeNorm(norms[first.doc]); // normalize }
public float score() { int f = freqs[pointer]; float raw = // compute tf(f)*weight f < SCORE_CACHE_SIZE // check cache ? scoreCache[f] // cache hit : getSimilarity().tf(f)*weightValue; // cache miss return raw * Similarity.decodeNorm(norms == null ? DEFAULT_NORM : norms[doc]); // normalize for field }
public float score() throws IOException { //System.out.println("scoring " + first.doc); float raw = getSimilarity().tf(freq) * value; // raw score return raw * Similarity.decodeNorm(norms[first.doc]); // normalize }
TermScorer(Weight weight, TermDocs td, Similarity similarity, byte[] norms) throws IOException { super(similarity); this.weight = weight; this.termDocs = td; this.norms = norms; this.weightValue = weight.getValue(); for (int i = 0; i < SCORE_CACHE_SIZE; i++) scoreCache[i] = getSimilarity().tf(i) * weightValue; }
public float score() { int f = freqs[pointer]; float raw = // compute tf(f)*weight f < SCORE_CACHE_SIZE // check cache ? scoreCache[f] // cache hit : getSimilarity().tf(f)*weightValue; // cache miss return raw * Similarity.decodeNorm(norms[doc]); // normalize for field }
public float score() { int f = freqs[pointer]; float raw = // compute tf(f)*weight f < SCORE_CACHE_SIZE // check cache ? scoreCache[f] // cache hit : getSimilarity().tf(f)*weightValue; // cache miss return raw * Similarity.decodeNorm(norms[doc]); // normalize for field }
public float score() throws IOException { float raw = getSimilarity().tf(freq) * value; // raw score return raw * Similarity.decodeNorm(norms[doc]); // normalize }
public float score() throws IOException { float raw = getSimilarity().tf(freq) * value; // raw score return raw * Similarity.decodeNorm(norms[doc]); // normalize }
public Explanation explain(final int doc) throws IOException { Explanation tfExplanation = new Explanation(); skipTo(doc); float phraseFreq = (doc() == doc) ? freq : 0.0f; tfExplanation.setValue(getSimilarity().tf(phraseFreq)); tfExplanation.setDescription("tf(phraseFreq=" + phraseFreq + ")"); return tfExplanation; }
public Explanation explain(final int doc) throws IOException { Explanation tfExplanation = new Explanation(); skipTo(doc); float phraseFreq = (doc() == doc) ? freq : 0.0f; tfExplanation.setValue(getSimilarity().tf(phraseFreq)); tfExplanation.setDescription("tf(phraseFreq=" + phraseFreq + ")"); return tfExplanation; }
public Explanation explain(final int doc) throws IOException { Explanation tfExplanation = new Explanation(); skipTo(doc); float phraseFreq = (doc() == doc) ? freq : 0.0f; tfExplanation.setValue(getSimilarity().tf(phraseFreq)); tfExplanation.setDescription("tf(phraseFreq=" + phraseFreq + ")"); return tfExplanation; }
public Explanation explain(final int doc) throws IOException { Explanation tfExplanation = new Explanation(); while (next() && doc() < doc) {} float phraseFreq = (doc() == doc) ? freq : 0.0f; tfExplanation.setValue(getSimilarity().tf(phraseFreq)); tfExplanation.setDescription("tf(phraseFreq=" + phraseFreq + ")"); return tfExplanation; }
public Explanation explain(final int doc) throws IOException { Explanation tfExplanation = new Explanation(); while (next() && doc() < doc) {} float phraseFreq = (doc() == doc) ? freq : 0.0f; tfExplanation.setValue(getSimilarity().tf(phraseFreq)); tfExplanation.setDescription("tf(phraseFreq=" + phraseFreq + ")"); return tfExplanation; }
public Explanation explain(final int doc) throws IOException { Explanation tfExplanation = new Explanation(); while (next() && doc() < doc) {} float phraseFreq = (doc() == doc) ? freq : 0.0f; tfExplanation.setValue(getSimilarity().tf(phraseFreq)); tfExplanation.setDescription("tf(phraseFreq=" + phraseFreq + ")"); return tfExplanation; }