Skip to content

Commit 61fbf45

Browse files
committed
fix nested single clause boolean queries
Signed-off-by: Sawan Srivastava <[email protected]>
1 parent 2b9514b commit 61fbf45

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/src/main/java/org/opensearch/search/approximate/ApproximateBooleanQuery.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ public Query rewrite(IndexSearcher indexSearcher) throws IOException {
7878

7979
// If the single clause is an ApproximateScoreQuery, set its context
8080
if (clauseQuery instanceof ApproximateScoreQuery approximateQuery) {
81+
if (approximateQuery.getApproximationQuery() instanceof ApproximateBooleanQuery nestedBool) {
82+
return nestedBool.rewrite(indexSearcher);
83+
}
8184
return approximateQuery;
8285
}
8386

0 commit comments

Comments
 (0)