关闭指定的索引。
索引关闭之后:
- 停止对读、写操作的响应。
- 停止检索操作的响应。
- 在索引关闭前,允许执行的操作,关闭之后均不允许执行。
ElasticSearch
取消对索引的相关维护操作,包含内存中的数据结构,以及保存在存储中的数据。- 占用的存储空间,并不会主动释放。
ElasticSearch
不会删除已关闭的索引的数据文件。
命令样例如下:
curl -X POST "https://localhost:9200/testindex_003/_close?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
执行结果的样例,如下:
{
"acknowledged": true,
"shards_acknowledged": true,
"indices": {
"my-index-000001": {
"closed": true
}
}
}
相关资料
- ElasticSearch Close index APIelasticsearch close index api elasticsearch index api get elasticsearch index open api elasticsearch settings index api elasticsearch index stats api elasticsearch clone index api elasticsearch delete index api elasticsearch create index api elasticsearch modules index elasticsearch logstash could index