What library to Java code use Elasticsearch under?

I decided to try Java to leave requests in elastic, and can not understand which client to take and how good to live..
From the official clients there are three.
There is a transport client in Java (which is on port 9300) - it seems like deprecated, and for each version of your...
There are low-level REST client.
There is a high-level REST client, which works through a low-level...

Maybe someone will suggest something like Python elasticsearch-dsl?
And I would like to know who's using what.
June 10th 19 at 14:34
1 answer
June 10th 19 at 14:36
The answer himself.

Complement, there is still a jest client https://www.elastic.co/blog/found-java-clients-for...
But it is necessary to drag the official Ń‚transport client, mainly because of QueryBuilders, which is good (I had started to write classes for the query-mapping)
In General, pull out all of jackson approximately so
String query = "{\n" + 
 "\"query\": { \"match_all\": {}\n" + 
 "}" + 
 "}\n" + 
 "\n" + 
 Response response = client.performRequest("GET","/offers_v1/offer/_search", new Hashtable<>(),
 new StringEntity(query));

 HttpEntity entity = response.GetEntity method();

 ObjectMapper ob = new ObjectMapper()
 .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
 ResponseHits responseHits = ob.readValue(entity.getContent(), ResponseHits.class);
 List<hit> hits = responseHits.getHits().getHits();

 return Results.html (the"index").put("hits", hits);</hit>

To do this, create the following classes ResponseHits. Hits, Hit
public class ResponseHits {
 private Hits hits;
public class Hits {
 private List<hit> hits;
public class Hit {
 @JsonProperty(value = "_index")
 private String index;
 @JsonProperty(value = "_type")
 private String type;
 @JsonProperty(value = "_id")
 private String id;
 @JsonProperty(value = "_score")
 private Double score;
 @JsonProperty(value = "_source")
 private Hashtable<string, object> source;

Find more questions by tags ElasticsearchJava