ElasticSearch notes


For installation check this url. (DEB page link)

Default cluster configuration:

cluster name elasticsearch

Start/stop service


sudo -i service elasticsearch start
sudo -i service elasticsearch stop

Systemd (read more here):

sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service
sudo systemctl restart elasticsearch.service
sudo systemctl status elasticsearch.service

sudo systemctl enable elasticsearch.service
sudo systemctl disable elasticsearch.service

sudo systemctl start kibana.service
sudo systemctl stop kibana.service

Version and log information

view log sudo journalctl -f
view log for service sudo journalctl –unit elasticsearch

Cluster information

Health curl -X GET “localhost:9200/_cat/health?v”
Indices curl “localhost:9200/_cat/indices?v”

Index management

index stats curl -X GET “localhost:9200/mydb/_stats?pretty”
get all documents curl -X GET “localhost:9200/_search” -H ‘Content-Type: application/json’ -d'{ “query”: { “match_all”: {} } }’
get all documents http://localhost:9200/mydb/_search
count all documents curl -X GET “localhost:9200/mydb/_count”
count all documents http://localhost:9200/mydb/_count
delete index entries curl -XPOST ‘localhost:9200/mydb/_doc/_delete_by_query?conflicts=proceed’ -H’Content-Type: application/json’ -d’ { “query”: { “match_all”: {} }}’
delete index curl -X DELETE “localhost:9200/mydb”


xbindkeys configuration


  1. mouse side button 8 sends Enter
  2. mouse side button 9 sends alt+left
  3. tilde sends ctrl+w



sudo apt-get install xautomation
sudo apt-get install x11-utils
sudo apt-get install xdotool

To find the keycodes run xev or xbindkeys -k:

xbindkeys - k

Here is a sample script:

#send alt+left on side button 9
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"

#send Enter on side button 8
"xte 'key Return'"

#Using keycodes
"xte 'keydown Control_L' 'key w' 'keyup Control_L'"
    grave + release



Personal portal to the Internet