Refuse to load fields from _source when using the fields option and support wildcards. #15017
Refuse to load fields from _source when using the fields option and support wildcards. #15017jimczi merged 1 commit intoelastic:masterfrom jimczi:fields_option
fields option and support wildcards. #15017Conversation
There was a problem hiding this comment.
Should we fold the functionality directly into CustomFieldsVisitor?
|
Thanks Jim, I'm happily surprised that there were not too many tests using the |
There was a problem hiding this comment.
The point of the two above tests seems to be to test bw compat, I think we can remove them?
|
Thanks @jimferenczi this looks good to me. I just left a comment about two REST tests that I think we should remove. @bleskes would you mind having a quick look at this PR before it gets merged? |
|
This looks good to me. Thanks @jimferenczi . My only question is whether we should resolve wild cards in the field visitor. Feels more natural for me to resolve it based on the mappings and get a concrete list to the visitor. I think we have the support we need in the MapperService (or will be easy to build). I'm worried that a wild card on the lucene level may expose system/hidden fields users didn't mean.. I don't think it's a problem in practice though. @jpountz wdyt? |
There was a problem hiding this comment.
is AllFieldsVisitor still used with your change? If not can you remove it?
There was a problem hiding this comment.
no it's not. I'll remove it.
|
@bleskes Good question. We already support fields=* in master (see mentions of |
|
@jimferenczi Let's merge this one? |
Do not to load fields from _source when using the `fields` option. Non stored (non existing) fields are ignored by the fields visitor when using the `fields` option. Fixes #10783 Support * wildcard to retrieve stored fields when using the `fields` option. Supported pattern styles are "xxx*", "*xxx", "*xxx*" and "xxx*yyy".
Refuse to load fields from _source when using the `fields` option and support wildcards.
|
@jimferenczi please add version labels for each branch that you merged this PR into |
Fixes #14489
Do not to load fields from _source when using the
fieldsoption.Non stored (non existing) fields are ignored by the fields visitor when using the
fieldsoption.Fixes #10783
Support * wildcard to retrieve stored fields when using the
fieldsoption.Supported pattern styles are "xxx_", "_xxx", "xxx" and "xxx*yyy".