-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
rename processor fails when trying to rename to nested field with same parent name #19892
Comments
@djschny The reason this happens is that the rename processor only does I am open to loosening this up so that you can do as you suggest above. This does seem to be a super super conservative way of operating on the document that may not be necessary, but I'd like to hear your opinion around that. |
Thanks for the explanation behind the scenes @talevy. The
I'm trying to think of a situation where a user would want the processor to continue instead of fail, but am having trouble coming up with a situation where that would be useful. IMO we are safer going out with the failure behavior always and then can loosen back to the way it is implemented now. However going the opposite way in the future (add failure) would be a much harder change for the end user I'm thinking. Thoughts? |
the pipeline may continue if the that being said, this exception can be caught, and the processor can re-insert the field back into the original |
The cause of this exception is because ingest expects The same exception bubbles up when the
I think we should fix, both examples should just work. Ingest should just plainly overwrite the version field and not care about the previous value. The version field should become a json object that has a displayName string field. In this case only if the version field is already a json object it should not be overwritten. For example in this case (which works as expected):
|
I see this changed was merged and is labeled for v5, but with my testing on Is it intentional that the merged change was not included in |
@djschny This change is part of of rc1 (and beta1), so that shouldn't happen any more. I just checked the request snippet you shared initially in this issue and that doesn't fail. Or can you make the rename processor fail with a different request? |
@martijnvg that's great that it is included! Didn't think it was fixed since the issue was not closed. I'm going back through my Console/Sense histories and trying to find the situation where I saw the error. Sorry I should have posted the snippet on my previous comment. You are correct everything is working great with the snippet in my original post. If you don't mind give me another day to review with the work I was doing before and will report back with whether I made a mistake or found a different situation. Regardless thank you for the work, it really helps make the pipelines simpler! |
Sorry for the delay and was unable to reproduce, sorry for the noise, I either was using a different version or misread a different error for this one. Thanks again for getting this into v5. |
Elasticsearch version: v5.0.0-alpha5
Plugins installed: x-pack
JVM version: jdk1.8.0_92
OS version: Mac 10.11.5
Description of the problem including expected versus actual behavior:
When using an ingest pipeline with a rename processor that tries to rename the element to a nested one where the parent object name is the same as the current object, it fails.
Steps to reproduce:
Results in the following error:
Desired expectation is that this would work. The workaround right now is to rename to a temporary name. So for example:
The text was updated successfully, but these errors were encountered: