Indices.queries.cache.size come from the heap?

Does indices.queries.cache.size come out of the JVM heap or free memory not used by the JVM?

The query cache caches queries in the jvm heap.

I guess I'm surprised I thought I read that left over memory (not assigned to the JVM) was used by Lucene for caching related functions or that can improve search performance. Is this not the case?

Yes, this the case. Lucene relies a lot on the file system cache for data structures, for example like the inverted index for searching. This is the reason that uncached queries are fast too. The query cache is however different, at query time for specific queries the intermediate query results (as bitsets) are stored on the jvm heap, so that in certain cases Lucene doesn't need to recompute results for certain parts of the query.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.