Searching from a complex set of data has become a routine in almost all kind of applications. So I am creating a series on Elasticsearch integration with Django. In this part of series, I will be giving you a brief information about Elasticsearch and its installation on a Linux based system.

What is Elasticsearch?

Elasticsearch is a real-time distributed and open source full-text search and analytics engine. It is accessible from RESTful web service interface and uses schema-less JSON (JavaScript Object Notation) documents to store data. It is built on Java programming language, which enables Elasticsearch to run on different platforms. It enables users to explore a very large amount of data at very high speed.

Why do we need of Elasticsearch?

Elastic search is generally used for searching complex data structures or when we need to search a text from a huge content. It is very fast compared to conventional relational databases, and it’s this swiftness that makes it a perfect candidate for any search related functionalities.

Main Benefits of Elasticsearch.

  • Elasticsearch is developed on Java, which makes it compatible on almost every platform.
  • It uses JSON objects as responses, which makes it possible to invoke the Elasticsearch server with a large number of different programming languages.

All right, Let us start by installing Elasticsearch on a machine.


We know, Elasticsearch runs on JAVA. So make sure you have an updated JVM version. If you want to check the version then run java -version in the terminal.

Installing Elasticsearch.

Run the below commands :

  1. To create a new directory : mkdir test-elasticsearch
  2. To download : wget
  3. To extract : tar -xzf elasticsearch-5.1.1.tar.gz
  4. To start Elasticsearch : ./elasticsearch-5.1.1/bin/elasticsearch

When Elasticsearch starts up, there should be some logs to the terminal window.

terminal window

Now to check that its running correctly or not, open up a new terminal window and run the following command:

curl -XGET http://localhost:9200

Output Should be like :

"name" : "BCHWiLl",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "K6WfDYB6QquDiG2goJcq0Q",
"version" : {
"number" : "5.1.1",
"build_hash" : "5395e21",
"build_date" : "2016-12-06T12:36:15.409Z",
"build_snapshot" : false,
"lucene_version" : "6.3.0"
"tagline" : "You Know, for Search"

You can see the output in browser:


Great, now you have Elasticsearch running on your local machine!

Click here for more blogs…

At BoTree Technologies, we build enterprise applications with our Django team of 20+ engineers.

We also specialize in RPA, AI, Python, Ruby on Rails, JavaScript and ReactJS.

Consulting is free – let us help you grow!