how to use addScriptParam while updating a document in elasticsearch using java api ,i just upgraded to newer Elasticsearch version 5.2 from version 1.6.0 i am getting compile time in the following code
for (n<-0 to followList.size-1) {
var newObject:java.util.Map[String,Object] = Maps.newHashMap();
var follow=followList.get(n)
var followuuid=follow.getFollowID
var uuidType=follow.getClassType().toString()
newObject.put("FollowingItemUuid",followuuid)
newObject.put("FollowingItemUuidType",uuidType)
bulkRequest.add(client.prepareUpdate("testdb", ARTISTUSER_COLLECTION_NAME, artistUser.uuid)
.addScriptParam("newObject", newObject)
.setScript(new Script(script.ScriptType.INLINE,"ctx._source.FollowingItems += newObject",null,null)))
}
eclipse is giving error
value addScriptParam is not a member of org.elasticsearch.action.update.UpdateRequestBuilder possible cause: maybe a semicolon is missing before `value
addScriptParam'?
I have researched online but did not get a solution I know ES newer version changed many things in update API but I did not found any example for addScriptParam
how to use addScriptParam
in ES 5.2
java API ?