Skip to content
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

Query DSL: External terms doesn't work with _id field #3063

Closed
clintongormley opened this Issue May 20, 2013 · 0 comments

Comments

Projects
None yet
2 participants
@clintongormley
Copy link
Member

clintongormley commented May 20, 2013

curl -XPUT http://localhost:9200/index1/t1/123 -d '{ "name": "123" }'
curl -XPUT http://localhost:9200/index1/t1/456 -d '{ "name": "456" }'
curl -XPUT http://localhost:9200/index1/t2/1 -d '{ "ids": ["123", "456"] }'

Query with external terms returns no results:

curl http://localhost:9200/index1/t1/_search?pretty -d '{ "query": { "filtered": { "filter": { "terms": { "_id": { "index": "index1", "type": "t2", "id": "1", "path": "ids" } } } } } }'

Query with listed terms works:

curl http://localhost:9200/index1/t1/_search ?pretty -d '{ "query": { "filtered": { "filter": { "terms": { "_id": ["123", "456"] } } } } }'

External terms on name field works:

curl http://localhost:9200/index1/t1/_search?pretty -d '{ "query": { "filtered": { "filter": { "terms": { "name": { "index": "index1", "type": "t2", "id": "1", "path": "ids" } } } } } }'

Side issue: unmapped field throws NPE:

curl http://localhost:9200/index1/t1/_search?pretty -d '{ "query": { "filtered": { "filter": { "terms": { "XXX": { "index": "index1", "type": "t2", "id": "1", "path": "ids" } } } } } }'

@ghost ghost assigned kimchy May 20, 2013

@kimchy kimchy closed this in 0066566 May 20, 2013

kimchy added a commit that referenced this issue May 20, 2013

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.