请关注inline参数的变化

正确:

POST /test/type1/1/_update
{
"script" : {
"inline": "ctx._source.tags.contains(tag)?ctx.op =\"delete\":(ctx.op =\"none\")",
"params" : {
"tag" : "blue"
}
}
}

 

正确:

POST /test/type1/1/_update
{
"script" : {
"inline": "ctx._source.tags.contains(tag)?(ctx.op =\"delete\"):(ctx.op =\"none\")",
"params" : {
"tag" : "blue"
}
}
}

 

错误:

POST /test/type1/1/_update
{
"script" : {
"inline": "ctx._source.tags.contains(tag)?ctx.op =\"delete\":ctx.op =\"none\" ",
"params" : {
"tag" : "blue"
}
}
}

相关文章:

  • 2022-12-23
  • 2021-09-04
  • 2022-02-09
  • 2021-08-02
  • 2022-12-23
  • 2021-04-21
猜你喜欢
  • 2022-12-23
  • 2021-10-21
  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
  • 2021-07-05
  • 2021-10-22
相关资源
相似解决方案