Skip to content

Commit 7e6d723

Browse files
committed
spotless output
Signed-off-by: Atri Sharma <[email protected]>
1 parent c9b4c36 commit 7e6d723

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/src/main/java/org/opensearch/search/query/rewriters/BooleanFlatteningRewriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private void flattenClauses(List<QueryBuilder> clauses, BoolQueryBuilder target,
131131

132132
// Special handling for double negation: NOT over a bool that is ONLY NOTs
133133
if (clauseType == ClauseType.MUST_NOT && canFlatten(nestedBool, ClauseType.MUST_NOT)) {
134-
// not( bool( must_not: [X1..Xn] ) ) ==> must( bool( should: [X1..Xn], minimum_should_match: 1 ) )
134+
// not( bool( must_not: [X1..Xn] ) ) ==> must( bool( should: [X1..Xn], minimum_should_match: 1 ) )
135135
// This preserves the logical equivalence not(not(X)) == X and generalizes to multiple X via OR.
136136
BoolQueryBuilder orQuery = new BoolQueryBuilder();
137137
orQuery.minimumShouldMatch(1);

server/src/test/java/org/opensearch/search/query/rewriters/BooleanFlatteningRewriterTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void testMustNotClauseNoFlattening() {
103103
}
104104

105105
public void testDoubleNegationConvertedToPositiveMustShould() {
106-
// not( bool( must_not: [ term ] ) ) => must( bool( should: [ term ], msm=1 ) )
106+
// not( bool( must_not: [ term ] ) ) => must( bool( should: [ term ], msm=1 ) )
107107
QueryBuilder inner = QueryBuilders.boolQuery().mustNot(QueryBuilders.termQuery("product", "Oranges"));
108108
QueryBuilder query = QueryBuilders.boolQuery().mustNot(inner);
109109

0 commit comments

Comments
 (0)