@Override public void normalize(float norm, float boost) { for (Weight w : weights) { // normalize all clauses, (even if non-scoring in case of side affects) w.normalize(norm, boost); } }
/** * {@inheritDoc} */ public void normalize(float norm) { weight.normalize(norm); }
/** * {@inheritDoc} */ public void normalize(float norm) { weight.normalize(norm); }
@Override public void normalize(final float norm, final float topLevelBoost) { this.queryNorm = norm * topLevelBoost; queryWeight *= this.queryNorm; // we normalize the inner weight, but ignore it (just to initialize everything) if (innerWeight != null) innerWeight.normalize(norm, topLevelBoost); }
@Override public void normalize(final float norm, float topLevelBoost) { // incorporate boost topLevelBoost *= TwigQuery.this.getBoost(); for (final Weight w : weights) { // normalize all clauses, (even if prohibited in case of side affects) w.normalize(norm, topLevelBoost); } // Normalise root weight rootWeight.normalize(norm, topLevelBoost); }
public void normalize(float norm) { norm *= getBoost(); // incorporate boost for (int i = 0 ; i < weights.size(); i++) { Weight w = (Weight)weights.get(i); // normalize all clauses, (even if prohibited in case of side affects) w.normalize(norm); } }
public void normalize(float norm) { norm *= getBoost(); // incorporate boost for (int i = 0 ; i < weights.size(); i++) { BooleanClause c = (BooleanClause)clauses.elementAt(i); Weight w = (Weight)weights.elementAt(i); if (!c.prohibited) w.normalize(norm); } }
public void normalize(float norm) { norm *= getBoost(); // Incorporate our boost for (int i = 0 ; i < weights.size(); i++) ((Weight) weights.get(i)).normalize(norm); }
public void normalize(float norm) { norm *= getBoost(); // Incorporate our boost for (int i = 0 ; i < weights.size(); i++) ((Weight) weights.get(i)).normalize(norm); }
public void normalize(float norm) { norm *= getBoost(); // incorporate boost for (int i = 0 ; i < weights.size(); i++) { Weight w = (Weight)weights.get(i); // normalize all clauses, (even if prohibited in case of side affects) w.normalize(norm); } }
@Override public void normalize(final float norm, float topLevelBoost) { // incorporate boost topLevelBoost *= NodeBooleanQuery.this.getBoost(); for (final Weight w : weights) { // normalize all clauses, (even if prohibited in case of side affects) w.normalize(norm, topLevelBoost); } }
@Override public void normalize(final float norm, float topLevelBoost) { // incorporate boost topLevelBoost *= OrSpanQuery.this.getBoost(); for (final Weight w : weights) { // normalize all clauses w.normalize(norm, topLevelBoost); } }
@Override public void normalize(final float norm, float topLevelBoost) { // incorporate boost topLevelBoost *= NodeBooleanQuery.this.getBoost(); for (final Weight w : weights) { // normalize all clauses, (even if prohibited in case of side affects) w.normalize(norm, topLevelBoost); } }
public void normalize (float v) { weight.normalize(v); value = weight.getValue() * getBoost(); } public Explanation explain (IndexReader ir, int i) throws IOException {
@Override public void normalize(final float v) { weight.normalize(v * getBoost()); // incorporate boost this.value = weight.getValue(); }
/** Expert: Constructs and initializes a Weight for a top-level query. */ public Weight weight(Searcher searcher) throws IOException { Query query = searcher.rewrite(this); Weight weight = query.createWeight(searcher); float sum = weight.sumOfSquaredWeights(); float norm = getSimilarity(searcher).queryNorm(sum); weight.normalize(norm); return weight; }
/** Expert: Constructs and initializes a Weight for a top-level query. */ public Weight weight(Searcher searcher) throws IOException { Query query = searcher.rewrite(this); Weight weight = query.createWeight(searcher); float sum = weight.sumOfSquaredWeights(); float norm = getSimilarity(searcher).queryNorm(sum); weight.normalize(norm); return weight; }
/** Expert: Constructs an initializes a Weight for a top-level query. */ public Weight weight(Searcher searcher) throws IOException { Query query = searcher.rewrite(this); Weight weight = query.createWeight(searcher); float sum = weight.sumOfSquaredWeights(); float norm = getSimilarity(searcher).queryNorm(sum); weight.normalize(norm); return weight; }