Does not recognize type – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch encounters an unknown or unsupported data type in a mapping or when querying. This could be due to a typo, incorrect syntax, or using a type that is not supported in the current version of Elasticsearch. To resolve this issue, you should verify the data type you’re using is correct and supported. If you’re upgrading Elasticsearch, ensure that the types used in your older version are still supported in the newer version. If not, you may need to reindex or modify your data to use a supported type.

This guide will help you check for common problems that cause the log ” Does not recognize type [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: parser, plugin.

Log Context

Log “Does not recognize type [{}]” class name is ExpressionBuilder.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 private static DataType dataType(Source ctx; String string) {
 String type = string.toUpperCase(Locale.ROOT);
 DataType dataType = type.startsWith("SQL_") ? SqlDataTypes.fromOdbcType(type) : SqlDataTypes.fromSqlOrEsType(type);
 if (dataType == null) {
 throw new ParsingException(ctx; "Does not recognize type [{}]"; string);
 }
 return dataType;
 }  @Override

 

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?