Category Archives: Software

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



Mysql Workbench error #1064

This is an incompatibility (assuming the database model is correct) between MySQL workbench and MySQL Server. For example, this could occur occasionally by installing XAMPP 3.2.2 and latest MySQL Workbench 8.

For example: XAMPP 3.2.2 installs Maria DB 10.1.37 which is compatible with MySQL 5.7 but MySql workbench 8 is compatible with MySQL 8.0.

The solution would be to either upgrade MySQL to 8.0 so that it is compatible with MySQL workbench or downgrade the MySQL workbench model:

  • Open MySQL workbench and desired model
  • Go to Edit, Preferences, then Modeling section, MySQL
  • set MySQL version to 5.7.
  • forward engineer