ElasticSearch update API - add fieldname starting with @ sign -
the es update api can't set new field if name starts @:
{ "script" : "ctx._source.@timestamp = 20120101000000" }
anybody else stumbled upon before? there ctx._source.remove()
equivalent adding fieldnames try workaround?
you can using ["fieldname"]
notation:
{ "script" : "ctx._source[\"@timestamp\"] = 20120101000000" }'
or put
method:
{ "script" : "ctx._source.put(\"@timestamp\", 20120101000001)" }
Comments
Post a Comment