elastic-search
getting started queries#
List indices#
bashGET /_cat/indices
Confirm index exists#
bashGET /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
}
}