Class BasePointShapeQueryTestCase<T extends AbstractGeometryQueryBuilder<T>>

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.test.ESSingleNodeTestCase
org.elasticsearch.search.geo.BasePointShapeQueryTestCase<T>
Direct Known Subclasses:
BaseShapeQueryTestCase

public abstract class BasePointShapeQueryTestCase<T extends AbstractGeometryQueryBuilder<T>> extends ESSingleNodeTestCase
Collection of tests that can be applied to both geographic and cartesian coordinate data. For geographic data see child classes like GeoPointShapeQueryTests, GeoShapeQueryTests and GeoShapeWithDocValuesQueryTests. For cartesian data see child classes like CartesianPointShapeQueryTests, CartesianShapeQueryTests and CartesianShapeWithDocValuesQueryTests.
  • Field Details

  • Constructor Details

    • BasePointShapeQueryTestCase

      public BasePointShapeQueryTestCase()
  • Method Details

    • queryBuilder

      protected abstract SpatialQueryBuilders<T> queryBuilder()
    • fieldTypeName

      protected abstract String fieldTypeName()
    • getPlugins

      protected Collection<Class<? extends Plugin>> getPlugins()
      Description copied from class: ESSingleNodeTestCase
      The plugin classes that should be added to the node.
      Overrides:
      getPlugins in class ESSingleNodeTestCase
    • createMapping

      protected abstract void createMapping(String indexName, String fieldName, Settings settings) throws Exception
      Throws:
      Exception
    • createMapping

      protected void createMapping(String indexName, String fieldName) throws Exception
      Throws:
      Exception
    • testNullShape

      public void testNullShape() throws Exception
      Throws:
      Exception
    • testIndexPointsFilterRectangle

      public void testIndexPointsFilterRectangle() throws Exception
      Throws:
      Exception
    • testIndexPointsCircle

      public void testIndexPointsCircle() throws Exception
      Throws:
      Exception
    • testIndexPointsPolygon

      public void testIndexPointsPolygon() throws Exception
      Throws:
      Exception
    • testIndexPointsMultiPolygon

      public void testIndexPointsMultiPolygon() throws Exception
      Throws:
      Exception
    • testIndexPointsRectangle

      public void testIndexPointsRectangle() throws Exception
      Throws:
      Exception
    • testIndexPointsIndexedRectangle

      public void testIndexPointsIndexedRectangle() throws Exception
      Throws:
      Exception
    • testWithInQueryLine

      public void testWithInQueryLine() throws Exception
      Throws:
      Exception
    • testQueryWithinMultiLine

      public void testQueryWithinMultiLine() throws Exception
      Throws:
      Exception
    • testQueryLinearRing

      public void testQueryLinearRing() throws Exception
      Throws:
      Exception
    • testQueryPoint

      public void testQueryPoint() throws Exception
      Throws:
      Exception
    • testQueryMultiPoint

      public void testQueryMultiPoint() throws Exception
      Throws:
      Exception
    • testQueryPointFromGeoJSON

      public void testQueryPointFromGeoJSON() throws Exception
      Throws:
      Exception
    • samplePointDataMultiFormat

      protected Object[] samplePointDataMultiFormat(org.elasticsearch.geometry.Point pointA, org.elasticsearch.geometry.Point pointB, org.elasticsearch.geometry.Point pointC, org.elasticsearch.geometry.Point pointD)
      Produce an array of objects each representing a single point in a variety of supported point formats. For `geo_shape` we only support GeoJSON and WKT, while for `geo_point` we support a variety of additional special case formats. This method is therefor overridden in the tests for `geo_point` (@see GeoPointShapeQueryTests).
    • testQueryPointFromMultiPoint

      public void testQueryPointFromMultiPoint() throws Exception
      Throws:
      Exception
    • testIndexPointsFromLine

      public void testIndexPointsFromLine() throws Exception
      Throws:
      Exception
    • testIndexPointsFromPolygon

      public void testIndexPointsFromPolygon() throws Exception
      Throws:
      Exception
    • ignoreLons

      protected boolean ignoreLons(double[] lons)
      Only LegacyGeoShape has limited support, so other tests will ignore nothing