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

Uses uuid for auto-generated ids and prepends type #12834

Merged
merged 1 commit into from
Jul 14, 2017

Conversation

tylersmalley
Copy link
Contributor

This PR uses self-generated id's when creating documents. This will allow us to create type prepended id's in 6.x, allowing for direct get/update/delete instead of by query.

Without this, we will be forced to do things like this: https://github.com/elastic/kibana/pull/12794/files#diff-cc9fbe8850c8f590da1323a91d29717dR220

Here is some manual testing guidance: #12648 (comment)

Also, ES also now returning type_missing_exception in 5.6 instead of an illegal_argument_exception

@tylersmalley
Copy link
Contributor Author

Putting together a PR into master to show how much this cleans up.

@spalger
Copy link
Contributor

spalger commented Jul 13, 2017

I figured that we would only need to prefix IDs when we have a user-specified ID, why do we need it otherwise?

@spalger
Copy link
Contributor

spalger commented Jul 13, 2017

Oh, I guess when we receive an ID from the API we don't know if it needs to have the type prepended so if we always prepend the type then we remove a bit of ambiguity. 👍

@tylersmalley
Copy link
Contributor Author

Here is the PR into the single-type branch: tylersmalley#2

@tylersmalley
Copy link
Contributor Author

@spalger, exactly. This essentially allows us to remove all of the compatibility layer in 6.0 in exchange for creating ID's like this.

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@epixa epixa merged commit b82fbac into elastic:5.x Jul 14, 2017
epixa pushed a commit to epixa/kibana that referenced this pull request Jul 14, 2017
epixa added a commit that referenced this pull request Jul 14, 2017
* Uses uuid for auto-generated ids and prepends type (#12834)

Signed-off-by: Tyler Smalley <[email protected]>

* saved_objects: remove isSingleTypeError reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants