No geo search interface in rest-high-level-client

hi all,i have a question

how can i use geo search with RestClient??

no interface find in RestClient,and i use the elasticsearch-rest-high-level-client:6.6.1

can any one help me!

The search interface in the high level client is generic:

https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.6/java-rest-high-search.html

On the QueryBuilders you can find all geo queries you can perform. For example:

        SearchRequest searchRequest = new SearchRequest();
        SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
        searchSourceBuilder.query(QueryBuilders.geoIntersectionQuery("field", shapeBuilder));
        searchRequest.source(searchSourceBuilder);
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.