Elasticsearch Index Management: Quick Intro and Examples

Last updated:

WIP Alert This is a work in progress. Current information is correct but more content will probably be added in the future.

You can interact with indices on your elasticsearch cluster in many ways.

All examples are compatible with Elasticsearch version 2.x

Here are some example on how to talk to them using the HTTP API.

All examples are in Sense format, so that you can just copy and paste into Sense (Available as a Chrome plugin or a Kibana app)

List indices

GET /_stats/indexes

P.S.: for more detailed information, do GET /_mappings instead

View information about a single index

GET /my_index/_mappings

Create an index

POST /my_index

Delete an index

DELETE /my_index

Close an index

(put an index on standby - it can't serve data but can be reopened later)

POST /my_index/_close

Open an index

POST /my_index/_open

More info

Official Elasticsearch Guide on Index Management

Dialogue & Discussion