This document provides an overview of Elasticsearch concepts and best practices. It discusses Elasticsearch documentation, cluster sizing recommendations from 3 nodes to 100s of nodes, default installations, monitoring capabilities, auto-generated mappings, template structures, dynamic settings, dedicated node types, shard sizing between 15-50GB, specific cluster sizing tools, indexing operations like rollover and split, search optimizations, and considerations for multi-cluster architectures. Customer stories from Elastic Support are recommended to learn lessons from real-world use cases.
18. 18
Auto generated mappings
A Great Default, Can enforce Policy in Production
{
"line" : 4,
"play" : "HENRY IV",
”speech" : "So shaken as we are, so wan with
care,"
}
Sample document Auto-generated mapping
"line": {
"type": "long"
},
"play": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
”speech": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
Things to watch for
• Numeric default to
long where int is
sufficient
• ‘play’ field mapped
as both text and
keyword
• ‘speech’ should only
be type text
21. 21
Dynamic template settings
Elasticsearch Template
• "dynamic": true
‒ Newly detected fields are added to the mapping. (default)
https://www.elastic.co/guide/en/elasticsearch/reference/master/dynamic.html
22. 22
Dynamic template settings
Elasticsearch Template
• "dynamic": true
‒ Newly detected fields are added to the mapping. (default)
• "dynamic": false
‒ Newly detected fields are ignored.
https://www.elastic.co/guide/en/elasticsearch/reference/master/dynamic.html
23. 23
Dynamic template settings
Elasticsearch Template
• "dynamic": true
‒ Newly detected fields are added to the mapping. (default)
• "dynamic": false
‒ Newly detected fields are ignored.
• "dynamic": strict
‒ If new fields are detected, an exception is thrown and the document is rejected. New fields
must be explicitly added to the mapping.
https://www.elastic.co/guide/en/elasticsearch/reference/master/dynamic.html
34. 34
• Logging:
‒ Rollover API - https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html
‒ Shrink API - https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
‒ Split API - https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html
• Metrics
‒ Rollups API - https://www.elastic.co/guide/en/elasticsearch/reference/master/rollups-api.html
• Search:
‒ Query Profiler - https://www.elastic.co/guide/en/elasticsearch/reference/master/_profiling_queries.html
‒ Force Merge - https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
And there is much more...
35. 35
• Think of the impact of:
• Cross Cluster Search
• Cross Cluster Replication
• Elastic Cloud and Elastic Cloud Enterprise
• ABAC
Does a monolithic cluster make sense?
36. 36
"Here, Hold My Beer."
Customer Stories to
Learn from as Told by
Support
https://www.elastic.co/elasticon/conf/2018/sf/here-hold-my-beer-customer-stories-to-learn-from-as-told-by-support