Joining queries cannot be executed when – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.7-7.15

Briefly, this error occurs when ‘joining’ queries are attempted in Elasticsearch while the ‘node.data’ setting is set to ‘false’. This setting means the node will not hold any data, hence it cannot execute joining queries. To resolve this issue, you can either change the ‘node.data’ setting to ‘true’ or move your queries to a node where ‘node.data’ is set to ‘true’. Another solution is to reconfigure your cluster so that data nodes are available for executing such queries.

This guide will help you check for common problems that cause the log ” [joining] queries cannot be executed when ‘ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, query.

Log Context

Log “[joining] queries cannot be executed when ‘” class name is NestedQueryBuilder.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 }  @Override
 protected Query doToQuery(SearchExecutionContext context) throws IOException {
 if (context.allowExpensiveQueries() == false) {
 throw new ElasticsearchException("[joining] queries cannot be executed when '" +
 ALLOW_EXPENSIVE_QUERIES.getKey() + "' is set to false.");
 }  ObjectMapper nestedObjectMapper = context.getObjectMapper(path);
 if (nestedObjectMapper == null) {

 

 [ratemypost]