The `enabled` setting for the `_field_names` field has been deprecated and – Elasticsearch Error How To Solve Related Issues


The `enabled` setting for the `_field_names` field has been deprecated and – Elasticsearch Error How To Solve Related Issues

Opster Team

July-20, Version: 1.7-8.0

 

Before you begin reading this guide, we recommend you try running the Elasticsearch Error Check-Up which can resolve issues that cause many errors.

This guide will help you check for common problems that cause the log ” The `enabled` setting for the `_field_names` field has been deprecated and ” to appear. It’s important to understand the issues related to the log, so to get started, read the general overview on common issues and tips related to the Elasticsearch concepts: index.

Advanced users might want to skip right to the common problems section in each concept or try running the Check-Up which analyses ES to pinpoint the cause of many errors and provides suitable actionable recommendations how to resolve them (free tool that requires no installation).

Log Context

Log”The `enabled` setting for the `_field_names` field has been deprecated and”classname  is FieldNamesFieldMapper.java We extracted the following from Elasticsearch source code for those seeking an in-depth context :

String fieldName = entry.getKey();
  Object fieldNode = entry.getValue();
  if (fieldName.equals("enabled")) {
  String indexName = parserContext.mapperService().index().getName();
  if (parserContext.indexVersionCreated().onOrAfter(Version.V_8_0_0)) {
  throw new MapperParsingException("The `enabled` setting for the `_field_names` field has been deprecated and "
  + "removed but is still used in index [{}]. Please remove it from your mappings and templates.");
  } else {
  deprecationLogger.deprecate("field_names_enabled_parameter"; ENABLED_DEPRECATION_MESSAGE; indexName);
  builder.enabled(XContentMapValues.nodeBooleanValue(fieldNode; name + ".enabled"));
  }

 

Optimize Elasticsearch Performance

Try The Tool