Elasticsearch is a distributed search and analytics engine built on Lucene, widely used for log analytics (the ELK/Elastic stack), full-text search and, increasingly, vector search.
Why teams use it
- Powerful full-text search and aggregations
- Mature log analytics with Kibana
- Scales horizontally with sharding and replicas
Install it
docker run -p 9200:9200 -e discovery.type=single-node \
-e xpack.security.enabled=false docker.elastic.co/elasticsearch/elasticsearch:8.15.0A first working config
Create an index with an explicit mapping.
curl -X PUT localhost:9200/logs -H 'Content-Type: application/json' -d '{
"mappings": { "properties": {
"@timestamp": { "type": "date" },
"level": { "type": "keyword" },
"message": { "type": "text" }
} }
}'Run and verify
curl -X POST localhost:9200/logs/_search -H 'Content-Type: application/json' -d '{
"query": { "match": { "message": "timeout" } }
}'Mistakes to avoid early
- Unbounded mapping explosion from dynamic fields
- Too many small shards hurting performance
- No ILM, so indices grow without retention
Want senior help putting Elasticsearch to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.