这是文件:
{
"start_date": 2017-01-01
"end_date": 2017-01-02,
}
说这是我的价值:
2017-01-03
我想用这个条件更新文档:
if end_date field exists in document:
document.end_date = 2017-01-03
else:
document.end_date = 2017-01-03
document.start_date = 2017-01-03
更新文件:
{
"start_date": 2017-01-01
"end_date": 2017-01-03
}
弹性搜索脚本语言可以实现吗?