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

Opster Team

August-23, Version: 7.7-7.15

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

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.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

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) {

 

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?

Get expert answers on Elasticsearch/OpenSearch