0
votes

I am trying using script with query to update particular documents , but m not sure which class I need to use of jest client which work's with update by query

Here is my code

String h = " { "
                + " \"script\": { \n"
                + " \"inline\": \"ctx._source.order=params.prasad\", \n "
                + "\"params\": { \"prasad\":["+column+"] \n"
                + " } , \n"
                + "\"lang\": \"painless\" \n"
                + "},\n"
                + "\"query\": { \n"
                + "\"term\": { \n"
                + "\"orgid\": "+orgId+" \n"
                + "} \n"
                + "}";

LocalJestClientInstance.getInstance().getClient().execute(new Update.Builder(h).index(index).type(type).build());

This is not updating my documents.

Uri generating is this uri=loadfields/loadfields_type/_update,method=POST

Instead of _update how to get the _update_by_query

1
did you manage to solve this ?Hormigas

1 Answers

0
votes

Jest didn't have it before but it looks like it does have it now.

My workaround was to use a second client as well, a standard http client and parse the JSON output just for this functionality that was missing.