-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
_routing
in child type mapping prevents indexing
#1738
Comments
Yea, at least for now you need to explicitly pass the routing value (which is a good practice if you can). It happens because setting the parent automatically set the routing value when indexing, so it does not go and tries to extract the routing value from the actual document. |
still the same behaviour with 1.2, quick reproduction with sense
|
@spinscale perhaps close this in favour of #6730? |
if we decide to leave things as as they are now, this still needs to be fixed - and/or we could do it before 2.0 :-) |
Closed in favour of #6730 |
It appears that the child document's routing value is, by default, its parent's ID. Thus, if the parent has a
_routing
path set in its mapping, the child and parent will be mapped to different shards (which is bad).Adding
_routing
to the child mapping does not help, as the value from the document does not override the default routing value (i.e. the parent's ID). Instead, it causes an exception while indexing the child document.Reproduced in 0.19.0.RC3: https://gist.github.com/1902998
The text was updated successfully, but these errors were encountered: