I have already searching this since 2 days now. I use the sense chrome plugin to be able to test my queries but I don't find how to specify on which index he is supposed to search. So my queries search on all the indexes and it isn't easy to use.
I have try the following syntaxes:
GET _search
{
"query": {
"term": {
"_index": {
"value": "dev_events2"
}
}
}
}
GET _search
{
"_index": "dev_events2",
"query": {
"match_all" : { }
}
}
GET _search
{
"index": "dev_events2",
"query": {
"match_all" : { }
}
}
Regards,
Benjamin V.
Edit I finally have found the answer: just add the index name into the url for the get: localhost:9201/myIndexName
Heres curl example what works, and allows you to search multiple indexes:
For single specific index:
To find find index names:
And if you want to search all indexes: