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] Transition to typeless (mapping) APIs #39573

Merged
merged 3 commits into from Mar 4, 2019

Conversation

davidkyle
Copy link
Member

Removes deprecated usage of types in the APIs and resolves a reindex issue with the upgrade assistant in 7 to wit:

  • ml indices use doc as the single mapping type by convention
  • 7.0 has an upgrade assistant which advises to reindex the ml indices from the previous version
  • after reindex the mapping type of the destination index is _doc unless a target type is specified
  • ml may update the mapping of the results index when a new job is created
  • if ml continues to use the doc type after reindex a mapping conflict occurs as the index would have 2 types doc and _doc. This is the cause of [ML] Need to cope with .ml-config being an alias #38796

Depending on whether or not the upgrade assistant has been run the single mapping type of the ml indices may be doc or _doc, moving to the typeless APIs largely covers this situation however, there is the case of updating the results index mapping on job creation in which case the new mapping must have the same type as the old otherwise the index will have 2 types of mappings

Backport of #39256

@davidkyle davidkyle added :ml Machine learning backport v7.2.0 labels Mar 1, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

ML has historically used doc as the single mapping type but reindex in 7.x
will change the mapping to _doc. Switching to the typeless APIs handles the
case where the mapping type is either doc or _doc. This change removes 
deprecated typed usages.
@davidkyle
Copy link
Member Author

run elasticsearch-ci/bwc

…9574)

Following elastic#39256 some of these tests were generating
errors when indexing documents.  For consistency it's
best that all of them use typeless APIs.
@davidkyle davidkyle merged commit a58145f into elastic:7.x Mar 4, 2019
@davidkyle davidkyle deleted the ml-typeless-7x branch March 4, 2019 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants