javanna commented on a change in pull request #612:
URL: https://github.com/apache/lucene/pull/612#discussion_r791559098
##########
File path:
lucene/core/src/java/org/apache/lucene/search/TotalHitCountCollector.java
##########
@@ -16,7 +16,12 @@
*/
package org.apache.lucene.search;
-/** Just counts the total number of hits. */
+/**
+ * Just counts the total number of hits. For cases when this is the only
collector used, {@link
+ * IndexSearcher#count(Query)} should be called instead of {@link
IndexSearcher#search(Query,
+ * Collector)} as the former is faster whenever the match can be returned
directly from the index
Review comment:
I meant match count, but count is fine too.
--
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]