Process Elasticsearch JSON on the shell

Lets throw security out the window for a moment. Say we store user accounts with clear text passwords in Elasticsearch , what is the easiest way to use the results in a shell script? We can begin by creating two accounts, one for admin and one for john : # curl -XPUT localhost:9200/site/people/1?pretty=True -d ' {"name": "admin", "password": "secret", "admin": "true"} ' { "_index" : "site", "_type" : "people", "_id" : "1", "_version" : 1, "_shards" : { "total" : 2, "successful" : 1, "failed" : 0 }, "created" : true } # curl -XPUT localhost:9200/site/people/2?

Elasticsearch using Docker

Elasticsearch is a distributed RESTFul search tool over the HTTP protocol. And we are going to use Docker to spin up multiple nodes in the cluster. First we need a server node running Docker. I’m using a Debian server so the command I need is apt-get: # apt-get install docker.io After installing the package make sure the docker command is available: # docker version Client version: 1.3.1 Client API version: 1.