-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Lookup Terms Filter _cache parameter not being taken into account #3219
Comments
Thinking about it, its also not possible to NOT cache the result of the lookup... |
I will fix the cache flag to be taken into account, I think caching the lookup makes sense almost all times, and its bounded by size by default, so you should be ok with defining a small size if you are concerned by it? |
Not really concerned about size as much as with consistency. |
in that case, you can simply set |
I agree this should be possible to set per call, since setting that to 0 basically would interfere with other needs as well. |
@kimchy This way, maybe it even makes sense caching the total filter using as key the hashed content of the lookup? This way if you are not caching the lookup, you might still get some benefits. Does it make sense? |
I creatd a ticket for that on #3236 |
The parameter is taken into account for normal terms filter(when you pass the list of terms), but not when you are using the look up mechanism.
I won't paste a test case since it has to be long enough as for the response time to be meaningful, but I guess in this line there should be a check on wether or not to cache:
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/query/TermsFilterParser.java#L172
same way there is in: https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/query/TermsFilterParser.java#L193-L195
The text was updated successfully, but these errors were encountered: