Skip to content

_mapping ignores allow_no_indices parameter #31485

Closed
@tombousso

Description

@tombousso
$ curl "localhost:9200/ababababababab*/_mapping"
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","index":"ababababababab*"}],"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","index":"ababababababab*"},"status":404}

$ curl "localhost:9200/ababababababab*/_mapping?allow_no_indices=true"
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","index":"ababababababab*"}],"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","index":"ababababababab*"},"status":404}

$ curl "localhost:9200/ababababababab*/_mapping?allow_no_indices=false"
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"ababababababab*","index_uuid":"_na_","index":"ababababababab*"}],"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"ababababababab*","index_uuid":"_na_","index":"ababababababab*"},"status":404}

Tested on Elastic versions 6.3.0 and 6.1.3

Expected behavior:
localhost:9200/ababababababab*/_mapping?allow_no_indices=true returns {}

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