assert that doc was actually found

This commit is contained in:
Britta Weber 2015-10-13 14:35:32 +02:00
parent 318dfba464
commit d021b1bfeb
1 changed files with 2 additions and 1 deletions

View File

@ -225,7 +225,8 @@ public class FiltersFunctionScoreQuery extends Query {
}
FiltersFunctionFactorScorer scorer = (FiltersFunctionFactorScorer)scorer(context);
scorer.advance(doc);
int actualDoc = scorer.advance(doc);
assert (actualDoc == doc);
double score = scorer.computeScore(doc, subQueryExpl.getValue());
Explanation factorExplanation = Explanation.match(
CombineFunction.toFloat(score),