Use ElasticSearch 5.4.1.
I have a query on a small index (about 30k documents) that takes over one second in search time. I find that once I remove the "highlight" block, the search time is down to about 50ms!
"highlight": {
"pre_tags": [""],
"post_tags": [""],
"fields": {
"my_search_field": {}
}
}
More info: 15 total results. Query "size" is 10. I reduced "size" to 4, 6, etc, the search time do come down proportionally. "my_search_field" is not huge, and even if it is the default "fragment_size" should prevent Elastic from going through all of it anyway.
Any idea why it takes so long? Thanks.