query :-
POST demo_index/_update_by_query
{
"query" : {
"terms" : {
"_id" :[
"123"
]
}
},
"script" : {
"source" : "if (cox._source.time < params.time ) { cox.source.time = 8;}",
"lang": "painless",
"params" : {
"time" : 2,
"acctId" : "999",
"hash" : "rqwtqw"
}
}
}
Trying to implement this in OpenSearch using Java Client but couldn't figure out how to use Script.Builder for creating script data.
I did find some examples of ElasticSearch but I guess classes are different in OpenSearch so not able to use that same classes