use of org.opensearch.geometry.MultiPoint in project OpenSearch by opensearch-project.
the class GeoPointShapeQueryTests method testQueryMultiPoint.
public void testQueryMultiPoint() throws Exception {
XContentBuilder xcb = createDefaultMapping();
client().admin().indices().prepareCreate("test").addMapping("_doc", xcb).get();
ensureGreen();
MultiPointBuilder mpb = new MultiPointBuilder().coordinate(-35, -25).coordinate(-15, -5);
MultiPoint multiPoint = mpb.buildGeometry();
try {
client().prepareSearch("test").setQuery(QueryBuilders.geoShapeQuery(defaultGeoFieldName, multiPoint)).get();
} catch (Exception e) {
assertThat(e.getCause().getMessage(), containsString("does not support " + GeoShapeType.MULTIPOINT + " queries"));
}
}
Aggregations