且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

弹性搜索 - 如何追加术语?

更新时间: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>