I have indexes in elastic-search which are named as follows-
- indexName-2017-01-25
- indexName-2017-01-24
- indexName-2017-01-23
- ...and so on
All above indexes has same 'type', lets say "indexType".
Now I want to delete a record with a given "id" which might be present in any of the above indexes and user of my API will provide me following-
- id of the entity to be deleted.
- Index prefix i.e. "indexName-*".
- type of index i.e. "indexType".
How can I write a query in JAVA to delete an entity with given above information?