Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indices stats: field "_all" is problematic #2

Closed
lukas-vlcek opened this issue Apr 3, 2017 · 2 comments
Closed

Indices stats: field "_all" is problematic #2

lukas-vlcek opened this issue Apr 3, 2017 · 2 comments

Comments

@lukas-vlcek
Copy link
Owner

lukas-vlcek commented Apr 3, 2017

The data returned from Indices stats API contains _all field in the root level (the top most one). This is causing troubles when indexing such data to ES. Such as the following exceptions:

MapperParsingException[Field [_all] is a metadata field and cannot be added inside a document. Use the index API request parameters.]

or

MapperParsingException[Cannot generate dynamic mappings of type [_all] for [_all]]

The _all field cannot be created in index mapping because _all is metafield name. Historically, ES was creating the _all field for every indexed document automatically. There does not seem to be a way how to get output from the Indices stats API without the _all field in the root.

Moreover, starting with ES 6.x the _all field is no longer supported (including related include_in_all mapping option).

Other relevant resources:

Possible solutions:

  • May be we could use copy_to to copy content from _all field to other field before indexing and set "index": "no" for _all field. However, this still keeps _all field in the game and I am not sure if this is supported.

  • Rename the field before it is sent to Elasticsearch for indexing.

@lukas-vlcek
Copy link
Owner Author

For now the watches-cli has workaround, see ViaQ/watches-cli@77dd829

@lukas-vlcek
Copy link
Owner Author

Closed by b349155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant