You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the problem including expected versus actual behavior:
The doc['field'] notation works well when applied to script_fields but it does not in _update and _update_by_query. It will rather give a null_pointer_exception, no matter what input document.
You can vary this using other field types, using _update instead of _update_by_query and using doc['SUMAB'].value instead of doc['SUMAB']. The result ist all the same.
This is a long known issue, most recently discussed in #29290. Update scripts simply do not have access to doc values, since the doc may be coming from the translog. Eventually using doc in an update script will cause a compilation failure instead of a runtime failure, thanks to script contexts now allowing to have different script signatures, but this has not yet been done.
Elasticsearch version: 6.2
Plugins installed: []
JVM version: 8 (presumably any)
OS version: Any
Description of the problem including expected versus actual behavior:
The doc['field'] notation works well when applied to script_fields but it does not in _update and _update_by_query. It will rather give a null_pointer_exception, no matter what input document.
The notation is introduced as "doc values" in the reference documentation at "Modules/Scripting/Accessing document fields and special variables" as a more performant mean to access document fields.
Steps to reproduce:
Provide logs (if relevant):
The text was updated successfully, but these errors were encountered: