How to install Elasticsearch?

In this post, lets discus about the installation of Elasticsearch on windows.

The requirement for installing Elasticsearch is a Java. Elasticsearch recommends its user to install latest version of Java.

We can get the latest version of Java from the official website www.java.com.

The Elasticsearch package can be downloaded from the official link https://www.elastic.co/downloads/elasticsearch

The packages are available as follows,

Elasticsearch installation

Download zip file to install Elasticsearch on windows.

Unzip the package and place it appropriate directory as needed.

To run the Elasticsearch, traverse to elasticsearch\bin path in command prompt and open the elasticsearch.bat file.

By doing this, the Elasticsearch service will start running in command prompt. But when we close the command prompt, the Elasticsearch service will stop running.

So, the Elasticsearch should be installed as window service by running the following command in command prompt

elasticsearch\bin>service install

When command executed successfully, we will receive message as “The service elasticsearch-service-x64 has been installed”.

The Elasticsearch service can be start by using the following command

elasticsearch\bin>service start

Once the service is started, we can confirm it by browsing URL http://localhost:9200/ in browser.

If the service started successfully, it will return 200 status.

 

Note:

Sometimes, we get error while starting windows service which is installed using service install command.

Mostly, it will be because of JVM conflict with the environment variable %JAVA_HOME%. We can fix this by running the following command in command prompt which will set the default JVM to our elasticsearch service (reference)

elasticsearch-service-x64.exe //US//YOUR_SERVICE_NAME --Jvm auto

example:

elasticsearch-service-x64.exe //US//my-elastic-service --Jvm auto

where my-elastic-service is the custom name of our elasticsearch service.

Getting started with Elasticsearch

Hello Folks!!

I’m writing these articles to share my experience and experiments which I have done with Elasticsearch.

I have started experimenting Elasticsearch for its ultimate purpose – full text search. I was much impressed by the way real time searches happening and the working of analytics engine.

Previously, I have used SQL databases in my project which will handle millions of data every day. And plenty full text searches have been happened in databases via application & APIs. To increase the performance of full text search in the application, I have started experimenting Elasticsearch.

What is Elasticsearch?

Elasticsearch is a search server based on Lucene. It provides a distributed, multitenant-capable full-text search engine with a HTTP web interface and schema-free JSON documents. (Wikipedia)

Elasticsearch is a real-time distributed search and analytics engine. It allows you to explore your data at a speed and at a scale never before possible. It is used for full-text search, structured search, analytics, and all three in combination

Where we can start?

Elasticsearch: The Definitive Guide is very good source to explore Elasticsearch concepts. And book has been created with no assumptions, it’s written in the way as complete beginner to – search and distributed systems.

Elasticsearch encourages us to explore our data with a full text search functionality to our users.

Let’s discuss about basic terminologies and installation of Elasticsearch in upcoming post 🙂