javanna commented on a change in pull request #612:
URL: https://github.com/apache/lucene/pull/612#discussion_r791519630



##########
File path: lucene/core/src/test/org/apache/lucene/search/TestTermQuery.java
##########
@@ -91,16 +91,12 @@ public void 
testCreateWeightDoesNotSeekIfScoresAreNotNeeded() throws IOException
     IndexSearcher searcher = new IndexSearcher(reader);
     // use a collector rather than searcher.count() which would just read the
     // doc freq instead of creating a scorer
-    TotalHitCountCollector collector = new TotalHitCountCollector();
-    searcher.search(query, collector);
-    assertEquals(1, collector.getTotalHits());
+    assertEquals(1, searcher.count(query));

Review comment:
       oh boy I did not notice the comment which said exactly that :)




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