Skip to content

Indexing reserved fields inconsistent #13740

@clintongormley

Description

@clintongormley

If I create an index by indexing a document which contains a reserved field (eg _source, _id) then I get an exception. However, indexing the same document again works, eg:

DELETE t PUT t/t/1 { "_id": 12345 } 

returns:

 { "type": "illegal_argument_exception", "reason": "Mapper for [_id] conflicts with existing mapping in other types:\n[mapper [_id] cannot be changed from type [_id] to [long]]" } 

But indexing into an existing index works:

PUT t/t/1 { "_id": 12345 } 

This means that the following bulk request would throw an exception for the first document, but accept any following documents:

DELETE t POST t/t/_bulk {"create": {}} {"_id":12345} {"create": {}} {"_id":12345} 

Related to #10456

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions