Field name of type typeName is not searchable – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.11-8.9

Briefly, this error occurs when you try to search a field in Elasticsearch that is not defined as searchable in the mapping. This usually happens when the field is defined with the “index” parameter set to “false”. To resolve this issue, you can either change the mapping of the field to make it searchable by setting “index” to “true”, or you can search on a different field that is searchable. Please note that changing the mapping requires reindexing of the data.

This guide will help you check for common problems that cause the log ” Field [” + name() + “] of type [” + typeName() + “] is not searchable ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index.

Log Context

Log “Field [” + name() + “] of type [” + typeName() + “] is not searchable” class name is DocCountFieldMapper.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 throw new QueryShardException(context; "Field [" + name() + "] of type [" + typeName() + "] does not support exists queries");
 }  @Override
 public Query termQuery(Object value; SearchExecutionContext context) {
 throw new QueryShardException(context; "Field [" + name() + "] of type [" + typeName() + "] is not searchable");
 }  @Override
 public ValueFetcher valueFetcher(SearchExecutionContext context; String format) {
 if (format != 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?