Elastic Search Partial Update
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to do a partial update like below . Add some new fields like Bytes_In and Bytes_Out. And also run a script to update a field that is derived from other fields using a script. Script session-duration-script.groovy is under /config/scripts path. ctx._source.duration= (new Date().parse("yyyy-MM-dd HH:mm:ss.SSS",ctx._source.sessionTerminationDateTime.replace("T", " ").substring(0,23)).getTime() - new Date().parse("yyyy-MM-dd HH:mm:ss.SSS",ctx._source.eventConversionDateTime.replace("T", " ").substring(0,23)).getTime()) access/access-event