Getting Started with Elasticsearch

getting-started-with-elasticsearch

Elasticsearch is a distributed, open-source search and analytics engine built on Apache Lucene. It is designed for horizontal scalability, reliability and easy management. Apache Lucene is an open-source, high-performance, full-featured text search engine library written entirely in Java. The technology is suitable for nearly any application that requires full-text search—especially cross-platform applications.Elasticsearch stack comes with other popular open-source tools like Logstash for data collection, Kibana for data visualization etc. makes it easy for developers to work with massive amounts of structured, unstructured and time-series data available in real-time for search, logging, analytics and other use cases.

Elasticsearch supports RESTful operations. This means that you can use HTTP methods GET, POST, PUT, DELETE, etc. in combination with an HTTP URI to manipulate data.
Also, almost all popular programming languages has API libraries for Elasticsearch, making it very easy for developers to integrate their app with elasticsearch.

Installation & Configurations:

Prerequisites:

Elasticsearch works on Java, so make sure you have latest java installed (atleast java >= version 7)on your system, and all Environment variables example JAVA_HOME and path is set correctly.

Install Elasticsearch on Windows:

Download latest Elasticsearch ZIP file from Elasticsearch official website.

Here in my case I am installing Elasticsearch V 2.1.1 on Windows 8 and will install it on my c: drive.

Elasticsearch-zip

Once download is complete, extract the elasticsearch-2.1.1.zip file on c: drive.

After Extraction go to elasticsearch-2.1.1 folder, you will see couple of sub folders, say bin/ , config/, lib/,

elasticsearch-extracted

bin/ has main Elasticsearch app
lib/ has all the required libraries for elasticsearch to work
config/ has elasticsearch configuration files more importantly elasticsearch.yml has all required configuration which you might need to change as per your need.

Got to bin/ folder and run elasticsearch.bat, on successful start you will see success message as shown in below image.

elasticsearch-started

Now, go to your browser trigger URL http://localhost:9200/ , you will see something as shown in below image:

elasticsearch-started-browser

which means Elasticsearch is successfully started and ready to work.

Install Elasticsearch on Ubuntu:

First, check you have Java installed (install it if not)

Get zip file:

Unzip it:

Got to elasticsearch-2.1.1:

Run Elasticsearch

check if Elasticsearch is running:

you will see something similar on shell window:

which means Elasticsearch is running on Ubuntu.

Install Elasticsearch on Centos:

Make sure you have latest java intalled (install if not)

Get & install Elasticsearch:

Install it:

Start Elasticsearch service:

Check if Elasticsearch is running:

you will see something similar on shell window:

Now, you can query on Elasticsearch. We will cover queries and installation of few essential Elasticsearch plugins in our next tutorials.

You may also like...