Failed to select best terms – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch is unable to select the best terms for a particular operation, often due to a lack of resources or incorrect configuration. To resolve this issue, you can increase the resources allocated to Elasticsearch, particularly memory. Alternatively, you can review and adjust your Elasticsearch configuration, ensuring that the terms are correctly defined and that the system is not being overloaded with too many terms. Lastly, you can also try to optimize your queries to reduce the number of terms that need to be processed.

This guide will help you check for common problems that cause the log ” failed to select best terms ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index.

Log Context

Log “failed to select best terms” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 termVectorsFilter = new TermVectorsFilter(termVectorsByField; topLevelFields; request.selectedFields());
 try {
 } catch (IOException e) {
 throw new ElasticsearchException("failed to select best terms"; e);
 // write term vectors


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?