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

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -