Skip to content

Incorrect _all is disabled message #26136

@dadoonet

Description

@dadoonet

On elasticsearch 6.0.0-beta1, I'm running the following code:

DELETE my_index
PUT my_index
{
  "settings": {
    "index": {
      "analysis": {
        "analyzer": {
          "default_search": {
            "type": "custom",
            "tokenizer": "whitespace"
          }
        }
      }
    }
  },
  "mappings": {
    "notes": {
      "properties": {
        "foo": {
          "type": "text"
        }
      }
    }
  }
}

This gives in logs:

[2017-08-10T11:06:03,613][WARN ][o.e.c.a.s.ShardStateAction] [cEGsSDR] [my_index][4] received shard failed for shard id [[my_index][4]], allocation id [PoY2wM19RBiQCE6D4qfm-w], primary term [0], message [failed to update mapping for index], failure [MapperParsingException[Failed to parse mapping [notes]: [_all] is disabled in 6.0. As a replacement, you can use an [copy_to] on mapping fields to create your own catch all field.]; nested: IllegalArgumentException[[_all] is disabled in 6.0. As a replacement, you can use an [copy_to] on mapping fields to create your own catch all field.]; ]
org.elasticsearch.index.mapper.MapperParsingException: Failed to parse mapping [notes]: [_all] is disabled in 6.0. As a replacement, you can use an [copy_to] on mapping fields to create your own catch all field.
	at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:339) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:292) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.index.mapper.MapperService.updateMapping(MapperService.java:222) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.index.IndexService.updateMapping(IndexService.java:502) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.indices.cluster.IndicesClusterStateService.createIndices(IndicesClusterStateService.java:446) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:220) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.cluster.service.ClusterApplierService.lambda$callClusterStateAppliers$6(ClusterApplierService.java:492) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at java.lang.Iterable.forEach(Iterable.java:75) [?:1.8.0_121]
	at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:489) [elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:476) [elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:426) [elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:155) [elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:569) [elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:247) [elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:210) [elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.lang.IllegalArgumentException: [_all] is disabled in 6.0. As a replacement, you can use an [copy_to] on mapping fields to create your own catch all field.
	at org.elasticsearch.index.mapper.AllFieldMapper$TypeParser.parse(AllFieldMapper.java:108) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:126) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:91) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:336) ~[elasticsearch-6.0.0-beta1.jar:6.0.0-beta1]
	... 17 more

Metadata

Metadata

Assignees

Labels

:Search Foundations/MappingIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in Elasticsearch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions