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

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -