1. Million-scale ES query optimization of the actual combat can use the filter without query filter to get the corresponding doc does not calculate score do not have to sort query to match the conditions of the DOC calculation score and sorting filter speed is much faster than query 2. Add related cache configuration indices.cache.filter.size:30% indices.fielddata.cache.size:60% Index.cache.field.type:soft indices.breaker.fielddata.limit:70% 3. Optimization scheme--summary can use filter without query add redundant fields add a partial range aggregation query into terms aggregation add configuration to the commonly used section, and Fielddata loading to eager. Try to load more memory to increase the cache resources of the cluster, use as much memory as possible
Global Ordinals
Index Warmer
Adjust the collect_mode of aggregation
On SSD
Elasticsearch some experience in using and optimization methods
Elasticsearch Index Speed optimization
Index.refresh_interval:-1
Index.number_of_shards:x
index.number_of_replicas:0
index.translog.sync_interval:30s
Index.translog.durability: "Async"
index.translog.flush_threshold_size:4g
index.translog.flush_threshold_ops:50000
Other
Save half the space by removing the _all field
Turn on index compression to save space, but 10%-20% performance loss
A string field that does not need to be participle is set to not_analyzed