Sunday 3 October 2021

How To Configure Elasticsearch On Windows

 Why Elasticsearch?

Elasticsearch can be used as a powerful search tool for your application. Because if you work with the relational database, it won’t allow a search for a large database which has millions of data sets. Then,  you need to fine-tune it to achieve it, but Elasticsearch is readily available to search. You just need to Create an index, type, and Document and push the data into Elasticsearch and you are ready to search.

As a developer, we mostly use a relational database for storing the data which helps us to easily join tables and pull this data from the database which we require. Over time, as these databases and tables become fat, we are not able to do an operation on these databases and tables.

On the other hand, Elasticsearch tool can easily perform a search on millions of documents in a few seconds. The two unique and significant features of Elasticsearch are -
  1. Horizontal scale
  2. High availability

Various Elasticsearch Clients

  • Java REST Client [6.2] — other versions
  • Java API [6.2] — other versions
  • JavaScript API
  • Groovy API [2.4] — other versions
  • .NET API [6.x] — other versions
  • PHP API [6.0] — other versions
  • Perl API
  • Python API
  • Ruby API
  • Community Contributed Clients

For details of Elasticsearch Clients, click here.

We are going to focus on .NET API in the entire series.

Now, let’s start with setting up Elasticsearch. For doing that, first, we require to download the latest JDK.

Downloading java development kit

Since many of us are from .NET background, we may not know how to use Java in our programming. For that purpose, I am going to show it in simple steps so that a novice developer can also start using it in their application.

For downloading JDK, click here.

Elastic Search

 

For this tutorial, I am going to use “Version 8 update 162” “(build 1.8.0_162-b12)”.

If you want to work with the same version which I am using, then this is the link to download.

  1. http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html
  2. https://www.filehorse.com/download-java-development-kit-64/33594/

After downloading Java JDK, next, we are going to install it.

Setting Java Home Variable

Once you have the JDK installation path, follow the below-mentioned process.

  • Right-click the My Computer icon on your desktop and select Properties.
  • Click the Advanced tab, then click the Environment Variables button.
  • Under System Variables, click New.
  • Enter the variable name as JAVA_HOME.
  • Enter the variable value as the installation path for the Java Development Kit.
  • Click OK.
  • Click Apply Changes.

If you still do not get how to set up, then refer to this link here.

After installing, just open Windows command prompt and type the following command -

javac

If you get the error “javac: command not found” that indicates javac path is not set properly. Still, try to restart the computer and once again check the command.

If you get all Java options, then you have set the path properly, as shown below.

Elastic Search

 

After completing the setting of Java Home Variable, next, we are going to download Elasticsearch.

Downloading Elasticsearch

Elastic Search

 

After clicking on Download button, it will take you to another page where you will have various download options. In that, we are going to choose Zip options.

Elastic Search

 Given below is the view of Elasticsearch files after unzipping the folder.

Elastic Search

Next, run the Elasticsearch tool.

Run Elastic search

Go to the bin folder of Elasticsearch.

Elastic Search

Then, in header, type “cmd”. This will open the command prompt on the folder path you have set.

Elastic Search

After coming to this path, next, enter “elasticsearch” keyword to start its instance, as shown below.

Elastic Search

It will run on “127.0.0.0” address with port no “9200”.   

Elastic Search      

Now, open your browser and enter localhost address “127.0.0.1” and with port no “9200”.

Elastic Search

If you get this page, then you have successfully started Elasticsearch instance.

Now, we have completed the configuration of Elasticsearch on Windows. In the next part, we are going to learn how to create Index and document in Elasticsearch.

1 comment:

  1. ElasticSearch + Kibana database

    Elasticsearch is a free, open-source search and analytics engine based on the Apache Lucene library. It’s the most popular search engine and has been available since 2010. It’s developed in Java, supporting clients in many different languages, such as PHP, Python, C#, and Ruby.

    Kibana is an free and open frontend application that sits on top of the Elastic Stack, providing search and data visualization capabilities for data indexed in Elasticsearch. Commonly known as the charting tool for the Elastic Stack (previously referred to as the ELK Stack after Elasticsearch, Logstash, and Kibana), Kibana also acts as the user interface for monitoring, managing, and securing an Elastic Stack cluster — as well as the centralized hub for built-in solutions developed on the Elastic Stack. Developed in 2013 from within the Elasticsearch community, Kibana has grown to become the window into the Elastic Stack itself, offering a portal for users and companies.ElasticSearch + Kibana database

    our ElasticSearch + Kibana database expert skills & 24/7 dedicated support for stable clusters and achieve unparalleled performance and cost reduction along with stable data health. Experience our enterprise-class, worldwide support for Kibana integrated Elasticsearch & other stack.With years of direct, hands-on experience managing large Elasticsearch deployments, Genex efficiently supports data-analytics in real time. Take advantage of market-leading functionalities and Kibana visualizations on large data sets, with features including high available clusters, TLS, and RBAC

    ReplyDelete