Hi Haoyu, I'm pretty sure (but not certain!) that query cache is smart enough to recurse through the full query tree, and consider any of the whole queries it finds during that recursion.
So e.g. a query like +A +B +(C D) would consider caching A, B, C D, or the whole original +A +B +(C D) query. But I'm not sure! Hopefully someone who knows more about query cache might chime in. Mike McCandless http://blog.mikemccandless.com On Mon, Feb 22, 2021 at 8:55 PM Haoyu Zhai <[email protected]> wrote: > Hi folks, > I'm trying to understand how QueryCache works and one question popped out > of my head was that is QueryCache caching > 1. the whole query that being submitted to IndexSearcher or > 2. it will recurse into the query and selectively caching some of the > clauses (especially for BooleanQuery)? > > From my observation it is the former case but I just want to double check > in case I missed anything. > > Thanks > Patrick >
