Class CentroidAggregationTestBase

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase

public abstract class CentroidAggregationTestBase extends AbstractGeoTestCase
Integration Test for CartesianCentroid metric aggregator
  • Constructor Details

    • CentroidAggregationTestBase

      public CentroidAggregationTestBase()
  • Method Details

    • aggName

      protected abstract String aggName()
    • centroidAgg

      protected abstract ValuesSourceAggregationBuilder<?> centroidAgg(String name)
    • testEmptyAggregation

      public void testEmptyAggregation()
    • testUnmapped

      public void testUnmapped() throws Exception
      Throws:
      Exception
    • testPartiallyUnmapped

      public void testPartiallyUnmapped()
    • testSingleValuedField

      public void testSingleValuedField()
    • testSingleValueFieldGetProperty

      public void testSingleValueFieldGetProperty()
    • testMultiValuedField

      public void testMultiValuedField() throws Exception
      Throws:
      Exception
    • coordinateName

      protected String coordinateName(String coordinate)
      Override this if the spatial data uses different coordinate names (eg. Geo uses lon/at instead of x/y
    • tolerance

      protected double tolerance(double a, double b)
      Override this if the spatial data needs custom tolerance calculations (eg. cartesian)
    • normalize

      protected double normalize(double value)
      Override this if the spatial data needs custom normalization (eg. cartesian)
    • assertSimilarValue

      protected void assertSimilarValue(double a, double b)
    • assertSameCentroid

      protected void assertSameCentroid(SpatialPoint centroid, SpatialPoint expectedCentroid)