Preparing for a DevOps interview that covers Elasticsearch? These questions come up again and again - here are strong, concrete answers.
Q: What is Elasticsearch and why use it?
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.
- Powerful full-text search and aggregations
- Mature log analytics with Kibana
- Scales horizontally with sharding and replicas
Q: What are the best practices you follow?
- Define explicit mappings; disable dynamic where possible
- Use Index Lifecycle Management for retention/rollover
- Size shards deliberately (tens of GB each)
Q: What mistakes have you seen?
- Unbounded mapping explosion from dynamic fields
- Too many small shards hurting performance
- No ILM, so indices grow without retention
Q: Show a basic configuration
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" }
} }
}'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.