/** * {@inheritDoc} */ @Override public float sumOfSquaredWeights() throws IOException { return weight.sumOfSquaredWeights(); }
/** * {@inheritDoc} */ public float sumOfSquaredWeights() throws IOException { return weight.sumOfSquaredWeights(); }
/** * {@inheritDoc} */ public float sumOfSquaredWeights() throws IOException { return weight.sumOfSquaredWeights(); }
public float sumOfSquaredWeights() throws IOException { return weight.sumOfSquaredWeights(); } public void normalize (float v) { weight.normalize(v); }
public float sumOfSquaredWeights() throws IOException { float sum = subQueryWeight.sumOfSquaredWeights(); for(int i = 0; i < valSrcWeights.length; i++) { if (qStrict) { valSrcWeights[i].sumOfSquaredWeights(); // do not include ValueSource part in the query normalization } else { sum += valSrcWeights[i].sumOfSquaredWeights(); } } sum *= getBoost() * getBoost(); // boost each sub-weight return sum ; }
public float sumOfSquaredWeights() throws IOException { float sum = subQueryWeight.sumOfSquaredWeights(); for(int i = 0; i < valSrcWeights.length; i++) { if (qStrict) { valSrcWeights[i].sumOfSquaredWeights(); // do not include ValueSource part in the query normalization } else { sum += valSrcWeights[i].sumOfSquaredWeights(); } } sum *= getBoost() * getBoost(); // boost each sub-weight return sum ; }
public float sumOfSquaredWeights() throws IOException { float sum = 0.0f; for (int i = 0 ; i < weights.size(); i++) { BooleanClause c = (BooleanClause)clauses.elementAt(i); Weight w = (Weight)weights.elementAt(i); if (!c.prohibited) sum += w.sumOfSquaredWeights(); // sum sub weights } sum *= getBoost() * getBoost(); // boost each sub-weight return sum ; }
public float sumOfSquaredWeights() throws IOException { float max = 0.0f, sum = 0.0f; for (int i = 0; i < weights.size(); i++) { float sub = ((Weight) weights.get(i)).sumOfSquaredWeights(); sum += sub; max = Math.max(max, sub); } return (((sum - max) * tieBreakerMultiplier * tieBreakerMultiplier) + max) * getBoost() * getBoost(); }
public float sumOfSquaredWeights() throws IOException { float max = 0.0f, sum = 0.0f; for (int i = 0; i < weights.size(); i++) { float sub = ((Weight) weights.get(i)).sumOfSquaredWeights(); sum += sub; max = Math.max(max, sub); } return (((sum - max) * tieBreakerMultiplier * tieBreakerMultiplier) + max) * getBoost() * getBoost(); }
@Override public float sumOfSquaredWeights() throws IOException { float sum = qWeight.sumOfSquaredWeights(); sum *= getBoost() * getBoost(); return sum ; }
public float sumOfSquaredWeights() throws IOException { float sum = 0.0f; for (int i = 0 ; i < weights.size(); i++) { BooleanClause c = (BooleanClause)clauses.get(i); Weight w = (Weight)weights.get(i); // call sumOfSquaredWeights for all clauses in case of side effects float s = w.sumOfSquaredWeights(); // sum sub weights if (!c.isProhibited()) // only add to sum for non-prohibited clauses sum += s; } sum *= getBoost() * getBoost(); // boost each sub-weight return sum ; }
public float sumOfSquaredWeights() throws IOException { return weight.sumOfSquaredWeights() * getBoost() * getBoost(); } public void normalize (float v) {
public float sumOfSquaredWeights() throws IOException { float sum = 0.0f; for (int i = 0 ; i < weights.size(); i++) { BooleanClause c = (BooleanClause)clauses.get(i); Weight w = (Weight)weights.get(i); // call sumOfSquaredWeights for all clauses in case of side effects float s = w.sumOfSquaredWeights(); // sum sub weights if (!c.isProhibited()) // only add to sum for non-prohibited clauses sum += s; } sum *= getBoost() * getBoost(); // boost each sub-weight return sum ; }
public float sumOfSquaredWeights() throws IOException { return weight.sumOfSquaredWeights() * getBoost() * getBoost(); }
public float sumOfSquaredWeights() throws IOException { return weight.sumOfSquaredWeights() * getBoost() * getBoost(); } public void normalize (float v) {
/** 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; }