Java API Client - Geo Bounding Box Query from Geohash

Using the old java client you could create a geo bounding box query by just supplying a geohash like so:

QueryBuilders.geoBoundingBoxQuery("some-field")
                .setCorners("some-geo-hash")

Was this feature removed from the new Java API Client as now you would have to either supply cords, tlbr, trbl or wkt instead?

Welcome!

Indeed. I can't see how to support Geo-bounding box query | Elasticsearch Guide [8.13] | Elastic with the Java Client.

@ltrotta Do you know?

Hey! I have written this query from the tutorial using the java client:

        esClient.search(sr -> sr
            .index("my_locations")
            .query(q -> q
                .bool(b -> b
                    .must(m -> m.matchAll(ma -> ma))
                    .filter(f -> f
                        .geoBoundingBox(g -> g
                            .field("pin.location")
                            .boundingBox(bb -> bb
                                .wkt(w -> w.wkt("BBOX (-74.1, -71.12, 40.73, 40.01)"))))))),Object.class);

The other options (cords,tlbr,trbl) can be set along with wkt as in this example.