Unable to update value in document to null

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Libraries used:
‘org.opensearch.client:opensearch-java:2.6.0’
‘org.opensearch.client:opensearch-rest-client:2.9.0’
‘org.opensearch.client:opensearch-rest-high-level-client:2.9.0’

Describe the issue:
I am trying to update an object in my OpenSearch document to null value. I am using org.opensearch.client:opensearch-java:2.6.0 library. After the update, the value of the object still remains as it was before. I am assuming this is related to desrializing/serializing null values. But I haven’t been able to find a solution

Configuration:

Relevant Logs or Screenshots:

Please use update by script APIs:

POST /my_index/_update/1
{
  "script": "ctx._source.remove('field_to_delete')"
}

Thank you.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.