Skip to content

Commit

Permalink
remove explain impl from ReplaceableConstDoubleValueSource
Browse files Browse the repository at this point in the history
  • Loading branch information
javanna committed Sep 21, 2023
1 parent fdb7253 commit 11796dc
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,8 @@ public boolean needsScores() {
}

@Override
public Explanation explain(LeafReaderContext ctx, int docId, Explanation scoreExplanation) throws IOException {
// TODO where is this explain called? I bet it's never tested, and probably never called.
ReplaceableConstDoubleValues fv = specialValues.get(ctx);
if (fv.advanceExact(docId)) {
return Explanation.match((float) fv.doubleValue(), "ReplaceableConstDoubleValues");
}
return Explanation.noMatch("ReplaceableConstDoubleValues");
public Explanation explain(LeafReaderContext ctx, int docId, Explanation scoreExplanation) {
throw new UnsupportedOperationException("explain is not supported for _value and should never be called");
}

@Override
Expand Down

0 comments on commit 11796dc

Please sign in to comment.