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

[ML] Consider collapsing multi-fields in the case of a mapping collision #51814

Open
davidkyle opened this issue Feb 3, 2020 · 1 comment
Open
Labels

Comments

@davidkyle
Copy link
Member

The problem description is copied from #29954 (comment)

If job-1 has been created using a partitoning field host then this is added to the mappings of the shared results index.

If a subsequent job-2 is created using host.keyword then the job creation will fail, because the results index already contains this field (named as host).

Having these extra mapping fields makes it much better for searching results as the end-user can use familiar syntax host: server1.

To workaround this, we currently recommend using a dedicated index for job-2. This will keep their results separate allowing host and host.keyword to exist in different indices.

As the results index always uses keywords as a data type, an alternative would be to check if host.keyword is a multi-field (and not a nested field) and then truncate the field name to plain host. This may lead to downstream issues in the UI where is has to plot source data and would need to know if it should use host or host.keyword.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

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

No branches or pull requests

2 participants