Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ public void testQueryRandomGeoCollection() throws Exception {
geoShapeQueryBuilder.relation(ShapeRelation.INTERSECTS);
SearchResponse result = client().prepareSearch("test").setQuery(geoShapeQueryBuilder).get();
assertSearchResponse(result);
assumeTrue("Skipping the check for the polygon with a degenerated dimension until "
+" https://issues.apache.org/jira/browse/LUCENE-8634 is fixed",
randomPoly.maxLat - randomPoly.minLat > 8.4e-8 && randomPoly.maxLon - randomPoly.minLon > 8.4e-8);
assertHitCount(result, 1);
}

Expand Down Expand Up @@ -423,7 +426,8 @@ public void testRandomGeoCollectionQuery() throws Exception {
}
gcb.shape(new PolygonBuilder(cb));

logger.info("Created Random GeometryCollection containing {} shapes", gcb.numShapes());
logger.info("Created Random GeometryCollection containing {} shapes using {} tree", gcb.numShapes(),
usePrefixTrees ? "default" : "quadtree");

if (usePrefixTrees == false) {
client().admin().indices().prepareCreate("test").addMapping("type", "location", "type=geo_shape")
Expand All @@ -444,7 +448,11 @@ public void testRandomGeoCollectionQuery() throws Exception {
geoShapeQueryBuilder.relation(ShapeRelation.INTERSECTS);
SearchResponse result = client().prepareSearch("test").setQuery(geoShapeQueryBuilder).get();
assertSearchResponse(result);
assertTrue(result.getHits().getTotalHits().value > 0);
assumeTrue("Skipping the check for the polygon with a degenerated dimension until "
+" https://issues.apache.org/jira/browse/LUCENE-8634 is fixed",
randomPoly.maxLat - randomPoly.minLat > 8.4e-8 && randomPoly.maxLon - randomPoly.minLon > 8.4e-8);
assertTrue("query: " + geoShapeQueryBuilder.toString() + " doc: " + Strings.toString(docSource),
result.getHits().getTotalHits().value > 0);
}

/** tests querying a random geometry collection with a point */
Expand Down