Skip to content

Commit

Permalink
Do not cache SingleValueQuery.LuceneQuery (elastic#110082)
Browse files Browse the repository at this point in the history
If the query gets cached, then it won't be able to emit warnings for multivalue fields.
  • Loading branch information
iverase committed Jun 24, 2024
1 parent de54e06 commit 3379778
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@ private Scorer scorer(Scorer nextScorer, LeafFieldData lfd) {

@Override
public boolean isCacheable(LeafReaderContext ctx) {
return next.isCacheable(ctx);
// we cannot cache this query because we loose the ability of emitting warnings
return false;
}
}

Expand Down

0 comments on commit 3379778

Please sign in to comment.