-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimizing use the QueryCache #14028
Comments
@jpountz, please help confirm when you are free, really appreciate feedback from you. |
I believe query cache is highly customizable: As a side note, it's generally not effective or appreciated to call out individuals in public here or on the mailing list unless there is some ongoing dialog. Not sure if Adrien is already engaged with you on this? |
Thank you very much for your reminder. I apologize for my offense and I will not do it again next time. It seems that the QueryCachingPolicy fails to fulfill my all requirements:
|
Description
In my use-case, I discover the utilization percentage of
QueryCache
(with a capacity of 3GB and only 50MB used) is extremely low. Most of the queries are as follows:should-match
condition will match over 500 documents, and the query value keeps changing, due to theshould
clause, it won't be cached byQueryCache
.filter-terms
will match over 100,000,000 documents, theuser_type
has several fixed values, it will also not be cached because of theskipCacheFactor
(100,000,000 / skipCacheFactor > 500).lucene/lucene/core/src/java/org/apache/lucene/search/LRUQueryCache.java
Line 773 in 067b472
There seem to be several points for optimization:
QueryCache
is not full utilized, can we loosen the restrictions to cache more queries that don't meet the current conditions?skip_factor
ofQueryCache
. Alternatively, this parameter could be deprecated, If a query meetsminFrequencyToCache
, meaning it is frequent, it should be placed intoQueryCache
.Furthermore, if user were able to dynamically adjust
maxSize
,maxRamBytesUsed
inQueryCache
, considering that the overhead of such adjustments is rather small.The text was updated successfully, but these errors were encountered: