WARNING: Version 5.x has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
The open and close index APIs allow you to close an index, and later on open it. A closed index has almost no overhead on the cluster (except for maintaining its metadata), and is blocked for read/write operations. A closed index can be opened which will then go through the normal recovery process.
Open and close and index by nameedit
var r = this.ConnectedClient.CloseIndex(Test.Default.DefaultIndex); r = this.ConnectedClient.OpenIndex(Test.Default.DefaultIndex);
Open and close default indexedit
var r = this.ConnectedClient.CloseIndex<ElasticSearchProject>(); r = this.ConnectedClient.OpenIndex<ElasticSearchProject>();