elastic-search

getting started queries#

List indices#

bash
GET /_cat/indices

Confirm index exists#

bash
GET /my-test-index

Add document to index#

bash
POST my-test-index/_doc/ { "message": "my test message" }

Get all documents from index#

bash
GET my-test-index/_search { "query": { "match_all": {} } }

Set index replicas#

Use this to make single node clusters have green health in aws

bash
PUT my-test-index/_settings { "index": { "number_of_replicas" : 0 } }

The rest#

Elasticsearch Query DSL: query

posts#