Class GeoShapeQueryBuilder

All Implemented Interfaces:
NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, QueryBuilder, Rewriteable<QueryBuilder>

public class GeoShapeQueryBuilder
extends AbstractGeometryQueryBuilder<GeoShapeQueryBuilder>
Derived AbstractGeometryQueryBuilder that builds a lat, lon GeoShape Query. It can be applied to any MappedFieldType that implements GeoShapeQueryable. GeoJson and WKT shape definitions are supported
  • Field Details

    • NAME

      public static final java.lang.String NAME
      See Also:
      Constant Field Values
    • STRATEGY_FIELD

      protected static final org.elasticsearch.common.ParseField STRATEGY_FIELD
  • Constructor Details

    • GeoShapeQueryBuilder

      public GeoShapeQueryBuilder​(java.lang.String fieldName, org.elasticsearch.geometry.Geometry shape)
      Creates a new GeoShapeQueryBuilder whose Query will be against the given field name using the given Shape
      Parameters:
      fieldName - Name of the field that will be queried
      shape - Shape used in the Query
    • GeoShapeQueryBuilder

      @Deprecated public GeoShapeQueryBuilder​(java.lang.String fieldName, ShapeBuilder shape)
      Creates a new GeoShapeQueryBuilder whose Query will be against the given field name using the given Shape
      Parameters:
      fieldName - Name of the field that will be queried
      shape - Shape used in the Query
    • GeoShapeQueryBuilder

      public GeoShapeQueryBuilder​(java.lang.String fieldName, java.util.function.Supplier<org.elasticsearch.geometry.Geometry> shapeSupplier, java.lang.String indexedShapeId, @Nullable java.lang.String indexedShapeType)
    • GeoShapeQueryBuilder

      @Deprecated public GeoShapeQueryBuilder​(java.lang.String fieldName, java.lang.String indexedShapeId, java.lang.String indexedShapeType)
      Deprecated.
      Creates a new GeoShapeQueryBuilder whose Query will be against the given field name and will use the Shape found with the given ID in the given type
      Parameters:
      fieldName - Name of the field that will be filtered
      indexedShapeId - ID of the indexed Shape that will be used in the Query
      indexedShapeType - Index type of the indexed Shapes
    • GeoShapeQueryBuilder

      public GeoShapeQueryBuilder​(java.lang.String fieldName, java.lang.String indexedShapeId)
      Creates a new GeoShapeQueryBuilder whose Query will be against the given field name and will use the Shape found with the given ID
      Parameters:
      fieldName - Name of the field that will be filtered
      indexedShapeId - ID of the indexed Shape that will be used in the Query
    • GeoShapeQueryBuilder

      public GeoShapeQueryBuilder​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details