open-close.asciidoc 1.2 KB

1234567891011121314151617181920212223242526272829
  1. [[indices-open-close]]
  2. == Open / Close Index API
  3. The open and close index APIs allow to close an index, and later on
  4. opening it. A closed index has almost no overhead on the cluster (except
  5. for maintaining its metadata), and is blocked for read/write operations.
  6. A closed index can be opened which will then go through the normal
  7. recovery process.
  8. The REST endpoint is `/{index}/_close` and `/{index}/_open`. For
  9. example:
  10. [source,js]
  11. --------------------------------------------------
  12. curl -XPOST 'localhost:9200/my_index/_close'
  13. curl -XPOST 'localhost:9200/my_index/_open'
  14. --------------------------------------------------
  15. It is possible to open and close multiple indices. An error will be thrown
  16. if the request explicitly refers to a missing index. This behaviour can be
  17. disabled using the `ignore_unavailable=true` parameter.
  18. All indices can be opened or closed at once using `_all` as the index name
  19. or specifying patterns that identify them all (e.g. `*`).
  20. Identifying indices via wildcards or `_all` can be disabled by setting the
  21. `action.destructive_requires_name` flag in the config file to `true`.
  22. This setting can also be changed via the cluster update settings api.