txwei commented on code in PR #16801:
URL: https://github.com/apache/lucene/pull/16801#discussion_r4300799137


##########
lucene/core/src/java/org/apache/lucene/search/MultiTermQuery.java:
##########
@@ -317,6 +317,14 @@ public long getTermsCount() {
     return -1;
   }
 
+  /**
+   * Return an upper-bound on the number of documents matched by this query. 
If not known,
+   * terms.getSumDocFreq() will be returned.
+   */
+  public long estimateCost(Terms terms) throws IOException {

Review Comment:
   Is there a reason why this doesn't copy the existing static helper with the 
two branches? That way we would be able to reduce some duplicated code. 



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