Skip to content

Instantly share code, notes, and snippets.

Created June 24, 2013 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5854123 to your computer and use it in GitHub Desktop.
Save anonymous/5854123 to your computer and use it in GitHub Desktop.
Problem with term lookup filter
curl -X POST 'localhost:9200/test_index/Task/test_task?routing=15793206719&refresh=true' -d '{
"name": "a task",
"index_ids": [
123
]
}'
curl -X POST 'localhost:9200/test_index/Domain/test_domain?routing=15793206719&refresh=true' -d '{
"public_index_ids": [
123
]
}'
# Find all tasks that have an index_id of "123". This returns "test_task"
curl -X POST 'localhost:9200/test_index/Task/_search?routing=15793206719' -d '{
"filter": {
"terms": {
"index_ids": [
123
]
}
}
}'
# Find all tasks that have an index_id in test_domain.public_index_ids. This returns no hits.
curl -X POST 'localhost:9200/test_index/Task/_search?routing=15793206719' -d '{
"filter": {
"terms": {
"_cache_key": "my_cache_key",
"index_ids": {
"index": "test_index",
"type": "Domain",
"id": "test_domain",
"path": "public_index_ids"
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment