how to use "consistency" parameter in java api when put data to elasticsearch -
i have used "consistency" parameter in python program put data elasticsearch ,but can not find usage of "consistency" in java api. can me?
you can write:
client.prepareindex("index", "doc", "doc1") .setsource("doc") .setconsistencylevel(writeconsistencylevel.quorum) .execute() .actionget()
Comments
Post a Comment