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

Updated: July-20

Elasticsearch 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 causing 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 discover the cause of many errors and provides suitable actionable recommendations (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"));
  }

Related issues to this log

We have gathered selected Q&A from the community and issues from Github, that can help fix related issues please review the following for further information :

1 Timestamp not appearing in Kibana -views 30,011 ,score 27

Elasticsearch 7 : Root mapping definition has unsupported parameters (mapper_parsing_exception) -views   14,003,score 16



Find Configuration Errors

Analyze Now