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
Forcefully never cache any filter that wraps a p/c filter #4757
Comments
ghost
assigned martijnvg
Jan 16, 2014
martijnvg
pushed a commit
to martijnvg/elasticsearch
that referenced
this issue
Jan 16, 2014
During query parsing if a filter is encountered that extends from NoCacheFilter then the filter will not be given to the filter cache (also not wrapped in FilterCacheFilterWrapper). Also if a filter directly or indirectly wraps a NoCacheFilter then that filter will also not be cached. Relates to elastic#4757
martijnvg
pushed a commit
to martijnvg/elasticsearch
that referenced
this issue
Jan 16, 2014
During query parsing if a filter is encountered that extends from NoCacheFilter then the filter will not be given to the filter cache (also not wrapped in FilterCacheFilterWrapper). Also if a filter directly or indirectly wraps a NoCacheFilter then that filter will also not be cached. Relates to elastic#4757
martijnvg
added a commit
to martijnvg/elasticsearch
that referenced
this issue
Jan 16, 2014
…rent) either directly or indirectly will never be cached by making CustomQueryWrappingFilter extend from NoCacheFilter. Closes elastic#4757
s1monw
added a commit
that referenced
this issue
Jan 20, 2014
During query parsing if a filter is encountered that extends from NoCacheFilter then the filter will not be given to the filter cache (also not wrapped in FilterCacheFilterWrapper). Also if a filter directly or indirectly wraps a NoCacheFilter then that filter will also not be cached. Relates to #4757
s1monw
added a commit
that referenced
this issue
Jan 20, 2014
During query parsing if a filter is encountered that extends from NoCacheFilter then the filter will not be given to the filter cache (also not wrapped in FilterCacheFilterWrapper). Also if a filter directly or indirectly wraps a NoCacheFilter then that filter will also not be cached. Relates to #4757
martijnvg
added a commit
that referenced
this issue
Jan 20, 2014
…rent) either directly or indirectly will never be cached by making CustomQueryWrappingFilter extend from NoCacheFilter. Closes #4757
martijnvg
added a commit
that referenced
this issue
Jan 22, 2014
Made the has_parent & has_child filterbuilder's cache options a noop as well, like it is in the related parsers. Relates to #4757
martijnvg
added a commit
that referenced
this issue
Jan 22, 2014
Made the has_parent & has_child filterbuilder's cache options a noop as well, like it is in the related parsers. Relates to #4757
martijnvg
added a commit
that referenced
this issue
Jan 22, 2014
Made the has_parent & has_child filterbuilder's cache options a noop as well, like it is in the related parsers. Relates to #4757
martijnvg
added a commit
that referenced
this issue
Jan 22, 2014
Made the has_parent & has_child filterbuilder's cache options a noop as well, like it is in the related parsers. Relates to #4757
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
During query parsing if a filter is encountered that extends from NoCacheFilter then the filter will not be given to the filter cache (also not wrapped in FilterCacheFilterWrapper). Also if a filter directly or indirectly wraps a NoCacheFilter then that filter will also not be cached. Relates to elastic#4757
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
…rent) either directly or indirectly will never be cached by making CustomQueryWrappingFilter extend from NoCacheFilter. Closes elastic#4757
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
Made the has_parent & has_child filterbuilder's cache options a noop as well, like it is in the related parsers. Relates to elastic#4757
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
Made the has_parent & has_child filterbuilder's cache options a noop as well, like it is in the related parsers. Relates to elastic#4757
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any filter that wraps a p/c filter (has_child & has_parent) either directly or indirectly must never be cached.
The reason behind this is that the filter-cache caches per segment reader and the p/c filters rely on executing with a top level reader. The p/c filters execute in a two phase search. The first phase collects the parent ids of any document that matches with the wrapped filter or query. The second phase iterates over all parent or child documents and checks if the parent id of each document (for parent docs this the _uid field value and child docs the _parent field value) is in the set of ids collected in the first phase. The second phase executes per segment, but the first phase executed top level.
Note: p/c filters on their own can't already be cached, since the cache options are a no-op in the filter parsers.
The text was updated successfully, but these errors were encountered: