This document provides step-by-step instructions to set up Elasticsearch on Linux and Windows, along with common operations such as creating an index, syncing data, and searching data.
The Elasticsearch implementation provides a high-performance search solution for beneficiary data. It enables fast, fuzzy, and flexible searching across millions of beneficiary records with sub-second response times.
The existing database search was experiencing performance issues:


Java (Elasticsearch 8.x comes with bundled JDK – no separate Java install required)
Minimum 4 GB RAM (recommended)
Open ports: 9200 (HTTP), 9300 (Transport)
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.x.x-linux-x86_64.tar.gzStep 2: Extract the Archive
tar -xzf elasticsearch-8.x.x-linux-x86_64.tar.gz
cd elasticsearch-8.x.x
Edit config/elasticsearch.ymlcluster.name: elasticsearch-cluster
node.name: node-1
network.host: 0.0.0.0
http.port: 9200
discovery.type: single-node
Step 4: Start Elasticsearch
./bin/elasticsearch
Step 5: Verify Installation
curl http://localhost:9200
Download the Windows ZIP from Elastic official site
Extract to a directory (example: C:\elasticsearch)
Edit config\elasticsearch.yml
cluster.name: elasticsearch-cluster
node.name: node-1
network.host: localhost
http.port: 9200
discovery.type: single-node
bin\elasticsearch.bat
Open browser or Postman:
http://localhost:9200
Step 1: Create docker-compose.yml
version: '3.8'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
container_name: amrit-elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=false
- ELASTIC_PASSWORD=Password
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
ports:
- "9200:9200"
- "9300:9300"
volumes:
- es-data:/usr/share/elasticsearch/data
networks:
- elastickibana:
image: docker.elastic.co/kibana/kibana:8.11.0
container_name: amrit-kibana
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=elastic
- ELASTICSEARCH_PASSWORD=Password
ports:
- "5601:5601"
depends_on:
- elasticsearch
networks:
- elasticvolumes:
es-data:
driver: localnetworks:
elastic:
driver: bridge
Step 2: Start Elasticsearch Container
docker compose up -d
Step-3: Verify Elasticsearch is running
curl -u elastic:Password http://localhost:9200