Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
  • Flutter Apps
Menu
Getting Started Elastic Search

Getting Started Guide for Elastic Search

Posted on July 3, 2024September 11, 2024 by Toma Velev

Follow this basic guide to get you started with Elastic Search for beginners – and – Kibana – the tool that you’ll get asked in job interviews. If you are wondering whu you need it for your personal projects – read my previous post: https://programtom.com/dev/2024/07/03/what-problems-elastic-search-resolves/

1. Introduction to Elasticsearch

Elasticsearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover the expected and uncover the unexpected.

2. Prerequisites

  • Basic understanding of JSON, HTTP, and RESTful APIs
  • Install Java on your machine (Elasticsearch is built using Java)

3. Installation

a. Download and Install Elasticsearch

  1. Linux/MacOS:
    • Download the latest version from Elasticsearch Downloads
    • Extract the tar file:tar -zxvf elasticsearch-7.17.0-linux-x86_64.tar.gz
    • Move into the extracted directory:cd elasticsearch-7.17.0/
    • Run Elasticsearch:./bin/elasticsearch
  2. Windows:
    • Download the latest version from Elasticsearch Downloads
    • Extract the zip file
    • Run Elasticsearch by executing elasticsearch.bat from the bin folder.

b. Docker

Run Elasticsearch using Docker Compose by following the official documentation:  https://www.elastic.co/blog/getting-started-with-the-elastic-stack-and-docker-compose. I’ve tried first with GPT Chat responses and wasted some time unsuccessfully.

4. Basic Operations

a.  Authentication

By default Elastic Search is protected and you need to update the elastic user password with “.\elasticsearch-reset-password.bat -u elastic”. The password will be everything after New value: (printed on the command line). 

https://www.elastic.co/guide/en/elasticsearch/reference/current/change-passwords-native-users.html. If you are using docker – the authentication is part of the .env file.

b. Verify Installation

To verify that Elasticsearch is running, navigate to https://localhost:9200/ in your web browser. Enter username elastic and password – the value from the command line. You will be able to see a JSON respose.

5. Monitoring and Management

a. Kibana

Kibana is a visualization tool for Elasticsearch. Download and install Kibana from Kibana Downloads.

After downloading the zip

  • unzip it,
  • from the elastic folder\bin – start .\elasticsearch-create-enrollment-token.bat -s kibana –url “https://localhost:9200”
  • start kibana\bin\kibana-setup.bat
  • paste the generated token 
  • wait a while until a it starts up (may take several minutes)
  • kibana dashboard should be accessible on http://localhost:5601/ – with the same login as the prompted in “Verify Installation”

b. X-Pack

X-Pack extends Elasticsearch with security, alerting, monitoring, reporting, and graph capabilities and it comes build in Elasticsearch 7.0 and above.

Other tools

Could check out several  tools in the official documentation https://www.elastic.co/blog/getting-started-with-the-elastic-stack-and-docker-compose that give nice visualizations and analytics. If you do – take into account that some of them are designed for linux and may not work on other OS.

 10. Further Reading and Resources

  • Elasticsearch Documentation
  • Elasticsearch API Reference
  • Elasticsearch GitHub Repository

For more advanced use cases, refer to the official documentation and explore the rich ecosystem of tools and plugins available for Elasticsearch.

I myself am planning to evolve a previous products by using elastic search service in the future.

  • https://programtom.com/dev/product/access-log-analyzer-micro-service-app-dev/
  • https://programtom.com/dev/product/tomcat-access-log-analyzer-v2/
  • What are ways to Optimize the backend endpoints in Spring Boot
  • Flutter image flickers
  • Could a Flutter App save a Flag even after uninstall
  • Could iOS flutter app logs be viewed while running in release mode – started after previous closed state
  • 6 Addictive Mobile Game Ideas Inspired by Flappy Bird’s Simplicity

Categories

  • Apps (20)
  • ChatGPT (19)
  • Choosing a Framework (38)
  • Flutter (206)
  • Graphical User Interface (13)
  • Marketing (114)
  • Software Development (270)
  • Spring (43)
  • StartUp (21)
  • Uncategorized (4)
  • Uncategorized (15)
  • Vaadin (14)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (83)
    • Flutter Apps (23)
    • GPT (4)
    • Java (38)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (35)
    • Utils (15)
    • Vaadin 24+ (27)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • What are ways to Optimize the backend endpoints in Spring Boot
  • Flutter image flickers
  • Could a Flutter App save a Flag even after uninstall
  • Could iOS flutter app logs be viewed while running in release mode – started after previous closed state
  • 6 Addictive Mobile Game Ideas Inspired by Flappy Bird’s Simplicity

Post Categories

  • Apps (20)
  • ChatGPT (19)
  • Choosing a Framework (38)
  • Flutter (206)
  • Graphical User Interface (13)
  • Marketing (114)
  • Software Development (270)
  • Spring (43)
  • StartUp (21)
  • Uncategorized (4)
  • Uncategorized (15)
  • Vaadin (14)