Elasticsearch Getting Started

  1. Home
  2. Blog
  3. Elasticsearch Getting Started

Elasticsearch Getting Started

Highly scalable, real-time search, distributed and analytics open source search engine build on top of Lucene and is natively JSON + REST API. In this tutorial we’ll look at some of the key concepts when getting started with Elasticsearch [ES].

Key Points
Open Source
Based on Lucene
Highly configurable
Runs on the JVM
Data exploration
Distributed: Cluster, fail over, replication, and master election out of the box
Schema less: document based, automated type mapping, JSON

Downloading and running ElasticSearch [ES]

ES can be downloaded packaged in various formats such as ZIP, DEB, RPM and TAR.GZ from elasticsearch.org. After downloading and extracting a package running it couldn’t be much easier, please noted Java runtime must be installed.

Running ElasticSearch on Windows

Navigate to the extracted directory to run ElasticSearch on Windows. We run C:\ELK\elasticsearch-1.4.2\bin\elasticsearch.bat [note this is my ES root directory]. This will start ElasticSearch running in the foreground in the console.

ES Start

Just two things we have to make sure, one JAVA is installed and second we have a JAVA_HOME environment variable configured correctly.

Let’s test ES is working using browser http://localhost:9200/

ES Run Check

If we get status 200 it means – everything is fine.

What’s JSON output tells us?

  • Ok: when it’s true, it means that request was successful.
  • Status: HTTP error code that resulted from request. 200 means OK.
  • Name: name of our ES instance. By default,it assign the node a random name.
  • Version: The object here has a number field, which is version of ES we are currently running, and a snapshot_build field, which indicates if what we are running has been built from sources.
  • Tagline: Contains first tagline of ES: “You Know, for Search.”

Useful Plugins

Now let’s install one of the ES plugin viz. ElasticSearch Head from http://mobz.github.io/elasticsearch-head/, this is an optional step.

C:\ELK\elasticsearch-1.4.2\bin>plugin -install mobz/elasticsearch-head

The Head plugin or elasticsearch-head is a web front end for browsing and interacting with an ES cluster.  For more details on available plugins refer to the plugin guide.

One more recommended Chrome plugin for quering ES is “Sense”. Sense provides a simple user interface for using ES REST API. It also has a number of features such as autocomplete for ES query syntax and copying & pasting requests in curl format. Below is how to get it.

ES Run Chrome Plugin
ES Run Chrome Plugin


Below are details on how to query ES using Sense for adding sample data to index.

ES Queries


We can verify data in ES head plugin as shown below.

ES Head Plugin
ES Head Plugin


So now we are ready to play with ES and ready to dive in, for getting more out it.

Now What’s Next?

1 2 3 19
Let's Share

Write a Reply or Comment

Show Buttons
Hide Buttons