Update value of a filed in a list of objects - Elasticsearch (update by query)

Console_-_Kibana

As shown in the image, I need to create a query that will accept a comma separated string of the id field and whichever id field's value matches, the flag is_read will change to true.

I tried to create something like this. But failed. Can someone help me with this?

    POST myindex/_update_by_query
    {
      "query" : {
        "bool" : {
          "filter" : {
            "terms" : {
              "notifications.id" : ["1119bb5e819c482c9b311f2a3315ca1b, 1119bb5e819c482c9b311f2a3153451b"] 
            }
          }
        }
      },
        "script" : {
          "inline" : "ctx._source.notifications.is_read= true;", 
          "lang"   : "painless"
          }
      }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.