Skip to content

excluding all fields of an object should not remove parent. #4717

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

Closed
wants to merge 3 commits into from

Conversation

bleskes
Copy link
Contributor

@bleskes bleskes commented Jan 14, 2014

When excluding '*.f1' from { "obj": { "f1": 1, "f2": 2 } } XContentMapValues.filter returns { "obj": { "f2": 2}}. When run on { "obj": { "f1" : 1 }} we should return { "obj": { }} to maintain object structure. People currently need to always check whether obj is there or not.

Closes #4715
Closes #4047
Related to #4491

RobCherry and others added 3 commits January 13, 2014 17:47
When excluding '*.f1' from `{ "obj": { "f1": 1, "f2": 2 } }` XContentMapValues.filter returns `{ "obj": { "f2": 2}}`. When run on `{ "obj": { "f1" : 1 }}` we should return `{ "obj": { }}` to maintain object structure. People currently need to always check whether `obj` is there or not.

Closes elastic#4715
Closes elastic#4047
Related to elastic#4491
@bleskes
Copy link
Contributor Author

bleskes commented Jan 14, 2014

@imotov thx for the review. Made the change you suggested it reads clearer.

@s1monw
Copy link
Contributor

s1monw commented Jan 14, 2014

LGTM

@bleskes
Copy link
Contributor Author

bleskes commented Jan 14, 2014

Pushed to: f2710c1
Thx.

@bleskes bleskes closed this Jan 14, 2014
@bleskes bleskes deleted the bug/4715 branch January 16, 2014 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_source filtering shouldn't remove objects unless explicitly excluded Empty objects are not stored in _source when an include/exclude list is present
4 participants