public class Application extends Controller {
public static Result index() {
// ElasticSearch HelloWorld
IndexTest indexTest = new IndexTest();
// "id" is mandatory if you want to update your document or to get by id else "id" is not mandatory
indexTest.id = "1";
indexTest.name = "hello World";
indexTest.index();
IndexTest byId = IndexTest.find.byId("1");
IndexResults<IndexTest> all = IndexTest.find.all();
IndexQuery<IndexTest> indexQuery = IndexTest.find.query();
indexQuery.setBuilder(QueryBuilders.queryString("hello"));