epotyom commented on code in PR #16446:
URL: https://github.com/apache/lucene/pull/16446#discussion_r4004451806
##########
lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestQueryParser.java:
##########
@@ -1026,4 +1027,13 @@ private boolean isAHit(Query q, String content, Analyzer
analyzer) throws IOExce
return false;
}
}
+
+ @Override
+ public void testSimpleDAO() throws Exception {
+ assertQueryEqualsDOA("term term term", null, "+term +term +term");
+ assertQueryEqualsDOA("term +term term", null, "+term +term +term");
+ assertQueryEqualsDOA("term term +term", null, "+(+term +term) +term");
+ assertQueryEqualsDOA("term +term +term", null, "+term +term +term");
+ assertQueryEqualsDOA("-term term term", null, "-term +(+term +term)");
Review Comment:
On second thought, it's probably better to handle this case in
`BooleanQuery#rewrite`, I opened https://github.com/apache/lucene/pull/16667
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]