Created
June 24, 2013 22:08
-
-
Save anonymous/5854123 to your computer and use it in GitHub Desktop.
Problem with term lookup filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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