更新时间:2023-02-19 08:46:54
这是一个完整的例子,您可以如何实现这一目标。
将新的值合并到数组中,并使其独特之后:
DELETE test / test / 1
POST test / test / 1
{
terms:[item1,item2,item3]
}
GET test / test / 1
POST测试/测试/ 1 / _update
{
脚本:ctx._source.terms<< newItems; ctx._source.terms = ctx._source .terms.flatten() 。$$$$
/$$$$ $ c>