-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Source filtering with wildcards broken when given multiple patterns #5132
Comments
Agreed. I can reproduce it and fix it. BTW, you can send PR if you think it fixes thing and we will be happy to comment on PR if there is anything wrong or if it needs some modification. :-) Thanks! |
dadoonet
added a commit
to dadoonet/elasticsearch
that referenced
this issue
Feb 15, 2014
``` curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{ "user" : "kimchy", "post_date" : "2009-11-15T14:12:12", "message" : "trying out Elasticsearch", "retweeted": false }' ``` No source fields delivered: ``` curl -XGET 'http://localhost:9200/twitter/tweet/1?_source=*.id,retweeted&pretty=yes' ``` `retweeted` returned: ``` curl -XGET 'http://localhost:9200/twitter/tweet/1?_source=retweeted,*.id&pretty=yes' ``` Closes elastic#5132.
Tests pass with the modification. PR #5133 created with a fix and a test. |
dadoonet
added a commit
that referenced
this issue
Feb 17, 2014
``` curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{ "user" : "kimchy", "post_date" : "2009-11-15T14:12:12", "message" : "trying out Elasticsearch", "retweeted": false }' ``` No source fields delivered: ``` curl -XGET 'http://localhost:9200/twitter/tweet/1?_source=*.id,retweeted&pretty=yes' ``` `retweeted` returned: ``` curl -XGET 'http://localhost:9200/twitter/tweet/1?_source=retweeted,*.id&pretty=yes' ``` Closes #5132. Closes #5133. (cherry picked from commit 5d15936)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No source fields delivered:
retweeted
returned:This happens because the filter breaks out of the loop instead of continuing to check whether any of the other
includes
may match. Replacing thebreak
with acontinue
fixes this. But I hesitate to submit a pull request because I didn't have time to fully understand this code.I understand that this is a corner case but it's a new feature in 1.0 and the example in the documentation does not work due to this bug.
The text was updated successfully, but these errors were encountered: