jpountz commented on code in PR #14187: URL: https://github.com/apache/lucene/pull/14187#discussion_r1993476471
########## lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java: ########## @@ -77,7 +77,8 @@ public class IndexSearcher { static int maxClauseCount = 1024; - private static QueryCache DEFAULT_QUERY_CACHE; + // Caching is disabled by default. + private static QueryCache DEFAULT_QUERY_CACHE = null; private static QueryCachingPolicy DEFAULT_CACHING_POLICY = new UsageTrackingQueryCachingPolicy(); Review Comment: Good question, I wondered about this too, and for `DEFAULT_CACHING_POLICY` as well. I agree that setting them in a centralized place where searchers get instantiated is a better practice. These defaults are still quite convenient for tests though, which don't have such a central place where searchers get created (not all tests rely on `LuceneTestCase#newSearcher`). In general, I'm in favor of this, would looking into it in a follow-up work for you? -- 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