My Profile Photo

Spencer Owen

The art of progress is to preserve order amid change and preserve change amid order - Alfred North Whitehead

Elasticsearch Commands

A collection of shortcuts when working with elasticsearch:

When you execute a command from the command line, use curl.

curl -XGET ''

However typing out every time gets tedious. Add the following to your ~/.bashrc (or ~/.bash_profile if on Mac)

export ELK=""
clk() {
  curl $ELK/$1

Then instead of typing out the full url, just type

clk /_all/_settings?pretty  

Clear Cache

POST '' -d '{ "fielddata": "true" }'


Cat is an api that provides a lot of information about nodes

GET /_cat/nodes?help'
GET /_cat/nodes?v&h=indexing.index_current'


Field data provides information about the performance and memory

GET /_all/_settings?pretty'
GET /_cluster/settings?pretty'
GET /_stats/fielddata?pretty&fields=*  #Per index 
GET /_nodes/stats/indices/fielddata?fields=* #Per Node