假设我有如下存储的文档。
document 1
{
id : '1',
title : "This is a test document1",
list : ["value1" , "value2"],
...
}
document 2
{
id : '2',
title : "This is a test document2",
valueList : ["value1" , "value2"],
...
}
我需要使用批量 API 向文档中的 valueList 添加更多元素,其中包含文档 ID 列表。结果应该看起来像
document 1
{
id : '1',
title : "This is a test document1",
list : ["value1" , "value2", "value3"],
...
}
document 2
{
id : '2',
title : "This is a test document2",
valueList : ["value1" , "value2" , "value3"],
...
}
我能做些什么来实现这一目标?我尝试使用脚本,但它只更新一个文档。
抱歉,我对弹性搜索真的很陌生。在这个问题上我什至可能是愚蠢的。请原谅并让我清楚这个问题。