sgup432 commented on code in PR #15818:
URL: https://github.com/apache/lucene/pull/15818#discussion_r3001984067


##########
lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestQueryParser.java:
##########
@@ -1038,4 +1039,122 @@ private boolean isAHit(Query q, String content, 
Analyzer analyzer) throws IOExce
       return false;
     }
   }
+
+  public void testK3DefaultDisabled() throws Exception {
+    QueryParser qp = getParser(new MockAnalyzer(random()));
+    // Parser no longer has k3 — it always produces raw duplicate clauses.
+    // With default BM25Similarity (k3 disabled), BooleanQuery.rewrite 
produces linear boost sum.

Review Comment:
   Yeah `TestBooleanRewrites + TestBM25Similarity` cover everything, these 
tests the same just with an extra step of parsing which is redundant. Removing 
this test



##########
lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java:
##########
@@ -660,6 +660,7 @@ protected Query getBooleanQuery(List<BooleanClause> 
clauses) throws ParseExcepti
     if (clauses.isEmpty()) {
       return null; // all clause words were filtered away by the analyzer.
     }
+

Review Comment:
   Sure!



-- 
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]

Reply via email to