Error about schema casting when updating documents attributes different than the error ones

13 views Asked by At

I got some issue with elasticsearch. I have a request which updates docs on elastics. this looks like:

POST /index/_update_by_query
{
   "query":{
         "match":{
              "load": "sync"
          }
    },
    "script":{
            source: `ctx._source.attributes.amount = params.amount`,
            params: { "amount": 59 },
    }
}

Even though the script only updates the amount value inside the attributes object, Im getting the next error:

"field \[client\] of type \[java.util.HashMap\] cannot be cast to \[java.lang.String\]",

May you have some thoughts in what could cause this?

Expected to update the documents inside the index

0

There are 0 answers