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

Change single operation shard hashing to only use id, and not id and type #472

Closed
kimchy opened this issue Nov 3, 2010 · 1 comment
Closed

Comments

@kimchy
Copy link
Member

kimchy commented Nov 3, 2010

Currently, single operation hashing (index/delete/get) is using the type as part of the hashing to decide which shard to direct to. It make more sense to just use the id for several reasons.

First, the new routing control capability will allow to direct docs to be placed in the same placement of another doc (blog, and commends for example) just based on that doc id (the routing when indexing a comment can use the blog post id, and thats it).

There are future features where this type of hashing will really simplify them, so it make sense to make this change now.

This change will require to reindex the data. In order to revert back to using the type for hashing as well, set cluster.routing.operation.use_type to true. This means that a cluster can be started by setting this flag, start another cluster, and reindex data from the old cluster into the new cluster.

@kimchy
Copy link
Member Author

kimchy commented Nov 3, 2010

Change single operation shard hashing to only use id, and not id and type, closed by 92b3ae3.

medcl pushed a commit to medcl/elasticsearch that referenced this issue Jul 1, 2011
costin pushed a commit to costin/elasticsearch that referenced this issue Dec 19, 2022
emilykmarx pushed a commit to emilykmarx/elasticsearch that referenced this issue Dec 26, 2023
emilykmarx pushed a commit to emilykmarx/elasticsearch that referenced this issue Dec 26, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant