Unsupported join key – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.9-8.9

Briefly, this error occurs when you’re trying to join two indices in Elasticsearch using a key that is not supported. Elasticsearch only supports joining on certain types of fields, such as keyword or number fields. If you’re trying to join on a text field or a field with a complex data type, you’ll get this error. To resolve this issue, you can either change the field type of the join key to a supported type, or create a new field with a supported type and use that as the join key.

This guide will help you check for common problems that cause the log ” Unsupported join key ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: parser, plugin, join.

Log Context

Log “Unsupported join key” class name is ExpressionBuilder.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 public List visitJoinKeys(JoinKeysContext ctx) {
 try {
 return ctx != null ? visitList(this; ctx.expression(); Attribute.class) : emptyList();
 } catch (ClassCastException ex) {
 Source source = source(ctx);
 throw new ParsingException(source; "Unsupported join key "; source.text());
 }
 }  @Override
 public Expression visitArithmeticUnary(ArithmeticUnaryContext ctx) {

 

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?