Hi,
I'm trying to use _update_by_query with upsert but facing issue.
> POST /search_history/stone/_update_by_query
> {
> "script" : {
> "inline": "ctx._source.stone_ids.addAll(params.ids)",
> "lang": "painless",
> "params" : {
> "ids" : [4,5]
> }
> },
> "query":{
> "bool":{
> "must":[{
> "match":{
> "party_id":2
> }}]
> }
> }
> }
ERROR:
> {
> "error": {
> "root_cause": [
> {
> "type": "parsing_exception",
> "reason": "Unknown key for a START_OBJECT in [upsert].",
> "line": 1,
> "col": 64
> }
> ],
> "type": "parsing_exception",
> "reason": "Unknown key for a START_OBJECT in [upsert].",
> "line": 1,
> "col": 64
> },
> "status": 400
> }
can anyone help me in this?