jpountz commented on code in PR #790:
URL: https://github.com/apache/lucene/pull/790#discussion_r844759861


##########
lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java:
##########
@@ -58,12 +58,6 @@ private static boolean shouldNeverCache(Query query) {
       return true;
     }
 
-    if (query instanceof DocValuesFieldExistsQuery) {
-      // We do not bother caching DocValuesFieldExistsQuery queries since they 
are already plenty
-      // fast.
-      return true;
-    }

Review Comment:
   I feel good about not having a benchmark for this. The reasoning is that if 
the index has a data structure that supports running the query very 
efficiently, then we should just use it and skip caching. And we have this for 
doc values, norms and vectors. In contrast, boolean queries for instance need 
to reconcile multiple queries together, which has overhead.
   
   So +1 to exclude FieldExistsQuery from caching entirely.



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to