There is limited documentation on using the java API for ElasticSearch. This repo has some easy to follow examples