To be able to replace org.elasticsearch.* classes with co.elastic.* classes it would be very helpful to find a good documentation with a lot of examples. Why is it poorly possible to find any?
For instance, what are the equivalent classes to their counterparts in org.elasticsearch.*? Sometimes they sound similar but it's hardly possible to refactor the old code.
current example. How can I refactor this org.elasticsearch code to co.elastic code?
public PartnerQueryBuilder withGeoBoundingBox(@NotNull GeoBoundariesDto geoBoundingBox) {
geoBoundingBoxQuery = new GeoBoundingBoxQueryBuilder(FieldName.LOCATION)
.setCornersOGC(
new GeoPoint(geoBoundingBox.getBottomLeft().getLat(), geoBoundingBox.getBottomLeft().getLon()),
new GeoPoint(geoBoundingBox.getTopRight().getLat(), geoBoundingBox.getTopRight().getLon())
);
return this;
}
using the Java Api client (to avoid using the deprecated RestHighLevelClient.
other topic would be how to get SearchResponses from a org.elasticsearch.:MultiSearchRequest which needs to be converted to a co.elastic..MsearcxhRequest!??
Welcome to the community! Thanks for your feedback on the examples. It is something we're aware of for the clients and actively building out. If there are particular examples you think would be useful to document raising a GitHub feature request issue could be helpful.
I've not written an example GeoBoundingBox query with the new Java client, but l think the Javadoc for GeoBoundingBoxQuery.Builder could help you get started.
Let us know if that does help, or if you get a solution working!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.