/** * {@inheritDoc} */ public float getValue() { return weight.getValue(); }
/** * {@inheritDoc} */ @Override public float getValue() { return weight.getValue(); }
SpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms) throws IOException { super(similarity); this.spans = spans; this.norms = norms; this.weight = weight; this.value = weight.getValue(); }
/** * {@inheritDoc} */ public float getValue() { return weight.getValue(); }
protected SpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms) throws IOException { super(similarity); this.spans = spans; this.norms = norms; this.weight = weight; this.value = weight.getValue(); doc = -1; }
protected SpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms) throws IOException { super(similarity); this.spans = spans; this.norms = norms; this.weight = weight; this.value = weight.getValue(); doc = -1; }
public float getValue() { return weight.getValue(); } public float sumOfSquaredWeights() throws IOException { return weight.sumOfSquaredWeights(); }
MatchAllScorer(IndexReader reader, Similarity similarity, Weight w) { super(similarity); this.reader = reader; id = -1; maxId = reader.maxDoc() - 1; score = w.getValue(); }
MatchAllScorer(IndexReader reader, Similarity similarity, Weight w) { super(similarity); this.reader = reader; id = -1; maxId = reader.maxDoc() - 1; score = w.getValue(); }
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 void normalize (float v) { weight.normalize(v); value = weight.getValue() * getBoost(); } public Explanation explain (IndexReader ir, int i) throws IOException {
public void normalize (float v) { weight.normalize(v); value = weight.getValue() * getBoost(); } public Explanation explain (IndexReader ir, int i) throws IOException {
public ConstantScorer(Similarity similarity, IndexReader reader, Weight w) throws IOException { super(similarity); theScore = w.getValue(); docIdSetIterator = filter.getDocIdSet(reader).iterator(); }
public ConstantScorer(Similarity similarity, IndexReader reader, Weight w) throws IOException { super(similarity); theScore = w.getValue(); docIdSetIterator = filter.getDocIdSet(reader).iterator(); }
@Override public void normalize(final float v) { weight.normalize(v * getBoost()); // incorporate boost this.value = weight.getValue(); }
/** Construct a <code>TermScorer</code>. * @param weight The weight of the <code>Term</code> in the query. * @param td An iterator over the documents matching the <code>Term</code>. * @param similarity The </code>Similarity</code> implementation to be used for score computations. * @param norms The field norms of the document fields for the <code>Term</code>. */ TermScorer(Weight weight, TermDocs td, Similarity similarity, byte[] norms) { 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; }
/** Construct a <code>TermScorer</code>. * @param weight The weight of the <code>Term</code> in the query. * @param td An iterator over the documents matching the <code>Term</code>. * @param similarity The </code>Similarity</code> implementation to be used for score computations. * @param norms The field norms of the document fields for the <code>Term</code>. */ TermScorer(Weight weight, TermDocs td, Similarity similarity, byte[] norms) { 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; }
/** Construct a <code>TermScorer</code>. * @param weight The weight of the <code>Term</code> in the query. * @param td An iterator over the documents matching the <code>Term</code>. * @param similarity The </code>Similarity</code> implementation to be used for score computations. * @param norms The field norms of the document fields for the <code>Term</code>. */ TermScorer(Weight weight, TermDocs td, Similarity similarity, byte[] norms) { 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; }
/** Construct a <code>TermScorer</code>. * @param weight The weight of the <code>Term</code> in the query. * @param td An iterator over the documents matching the <code>Term</code>. * @param similarity The </code>Similarity</code> implementation to be used for score computations. * @param norms The field norms of the document fields for the <code>Term</code>. */ TermScorer(Weight weight, TermDocs td, Similarity similarity, byte[] norms) { 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; }
PhraseScorer(Weight weight, TermPositions[] tps, int[] positions, Similarity similarity, byte[] norms) { super(similarity); this.norms = norms; this.weight = weight; this.value = weight.getValue(); // convert tps to a list for (int i = 0; i < tps.length; i++) { PhrasePositions pp = new PhrasePositions(tps[i], positions[i]); if (last != null) { // add next to end of list last.next = pp; } else first = pp; last = pp; } pq = new PhraseQueue(tps.length); // construct empty pq }