The following is just a list of resources and notes related to optimizing Elasticsearch.
-
Index Sorting and more and this
-
Use preference to route related searches to the same shards, to try and take advantage of caches
-
Experiment with execution hints, it can make a difference (even switching to
map
, despite what the docs say about when to use it) -
Try adjusting shard_size if you’re using large
size
values. -
There may be a natural index sorting if there’s a natural partition field for your data (eg all your searches target a single username)
-
You may be able to reduce the number of buckets being returned by using includes