public class GeoShapeQueryBuilder extends QueryBuilder implements BoostableQueryBuilder<GeoShapeQueryBuilder>
QueryBuilder that builds a GeoShape FilterToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsEMPTY_PARAMS| Constructor and Description |
|---|
GeoShapeQueryBuilder(String name,
ShapeBuilder shape)
Creates a new GeoShapeQueryBuilder whose Filter will be against the
given field name using the given Shape
|
GeoShapeQueryBuilder(String name,
ShapeBuilder shape,
ShapeRelation relation)
Creates a new GeoShapeQueryBuilder whose Filter will be against the
given field name using the given Shape
|
GeoShapeQueryBuilder(String name,
String indexedShapeId,
String indexedShapeType,
ShapeRelation relation)
Creates a new GeoShapeQueryBuilder whose Filter will be against the given field name
and will use the Shape found with the given ID in the given type
|
| Modifier and Type | Method and Description |
|---|---|
GeoShapeQueryBuilder |
boost(float boost)
Sets the boost for this query.
|
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
GeoShapeQueryBuilder |
indexedShapeIndex(String indexedShapeIndex)
Sets the name of the index where the indexed Shape can be found
|
GeoShapeQueryBuilder |
indexedShapePath(String indexedShapePath)
Sets the path of the field in the indexed Shape document that has the Shape itself
|
GeoShapeQueryBuilder |
queryName(String queryName)
Sets the name of the filter
|
GeoShapeQueryBuilder |
relation(ShapeRelation relation)
Sets the relation of query shape and indexed shape.
|
GeoShapeQueryBuilder |
strategy(SpatialStrategy strategy)
Defines which spatial strategy will be used for building the geo shape filter.
|
toXContentbuildAsBytes, buildAsBytes, toStringpublic GeoShapeQueryBuilder(String name, ShapeBuilder shape)
name - Name of the field that will be filteredshape - Shape used in the filterpublic GeoShapeQueryBuilder(String name, ShapeBuilder shape, ShapeRelation relation)
name - Name of the field that will be filteredrelation - ShapeRelation of query and indexed shapeshape - Shape used in the filterpublic GeoShapeQueryBuilder(String name, String indexedShapeId, String indexedShapeType, ShapeRelation relation)
name - Name of the field that will be filteredindexedShapeId - ID of the indexed Shape that will be used in the FilterindexedShapeType - Index type of the indexed Shapespublic GeoShapeQueryBuilder queryName(String queryName)
queryName - Name of the filterpublic GeoShapeQueryBuilder strategy(SpatialStrategy strategy)
strategy - The spatial strategy to use for building the geo shape filterpublic GeoShapeQueryBuilder indexedShapeIndex(String indexedShapeIndex)
indexedShapeIndex - Name of the index where the indexed Shape ispublic GeoShapeQueryBuilder indexedShapePath(String indexedShapePath)
indexedShapePath - Path of the field where the Shape itself is definedpublic GeoShapeQueryBuilder relation(ShapeRelation relation)
relation - relation of the shapespublic GeoShapeQueryBuilder boost(float boost)
BoostableQueryBuilderboost in interface BoostableQueryBuilder<GeoShapeQueryBuilder>protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContent in class QueryBuilderIOExceptionCopyright © 2009–2016. All rights reserved.