diff --git a/abcd/backends/atoms_opensearch.py b/abcd/backends/atoms_opensearch.py index 229fad16..8e66bfd5 100644 --- a/abcd/backends/atoms_opensearch.py +++ b/abcd/backends/atoms_opensearch.py @@ -832,10 +832,10 @@ def rename_property( query = self.parser(query) logger.info("rename: query=%s, old=%s, new=%s", query, name, new_name) - script_txt = f"if (!ctx._source.containsKey('{new_name}')) {{ " + script_txt = f"if (!ctx._source.containsKey(params.new_name)) {{ " script_txt += ( f"ctx._source.{new_name} = ctx._source.{name};" - " ctx._source.remove('params.name');" + " ctx._source.remove(params.name);" " for (int i=0; i