- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 91字
- 2021-06-24 14:52:17
How to do it...
For opening and closing an index, we will perform the following steps:
- From the command line, we can execute a POST call to close an index using the following command:
POST /myindex/_close
- If the call is successful, the result returned by Elasticsearch should be as follows:
{
"acknowledged" : true
}
- To open an index from the command line, type the following command:
POST /myindex/_open
- If the call is successful, the result returned by Elasticsearch should be:
{
"acknowledged" : true,
"shards_acknowledged" : true
}