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



##########
File path: lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java
##########
@@ -1169,7 +1169,7 @@ public void testDetectMutatedQueries() throws IOException 
{
     searcher.setQueryCachingPolicy(ALWAYS_CACHE);
 
     BadQuery query = new BadQuery();
-    searcher.count(query);
+    searcher.search(query, new TotalHitCountCollector());

Review comment:
       I think it makes the assumption that since BadQuery doesn't implement 
Weight#count then it will interact with caching. My gut feeling is that it's 
better to use TotalHitCountCollector which is more explicit.




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