Reputation: 89
curl -XPOST 'localhost:9200/test/_open'
curl -XPOST 'localhost:9200/test/_close'
How to achieve this with the Java API?
I have Googled lot but didn't find any solution.
Upvotes: 4
Views: 3870
Reputation: 17155
Playing around in eclipse, it looks like it should be something like this:
client.admin().indices().close(new CloseIndexRequest("test"));
client.admin().indices().open(new OpenIndexRequest("test"));
Upvotes: 8