org.elasticsearch.index.query
Class GeoShapeFilterBuilder
java.lang.Object
org.elasticsearch.index.query.BaseFilterBuilder
org.elasticsearch.index.query.GeoShapeFilterBuilder
- All Implemented Interfaces:
- ToXContent, FilterBuilder
public class GeoShapeFilterBuilder
- extends BaseFilterBuilder
FilterBuilder
that builds a GeoShape Filter
Constructor Summary |
GeoShapeFilterBuilder(String name,
com.spatial4j.core.shape.Shape shape)
Creates a new GeoShapeFilterBuilder whose Filter will be against the
given field name |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeoShapeFilterBuilder
public GeoShapeFilterBuilder(String name,
com.spatial4j.core.shape.Shape shape)
- Creates a new GeoShapeFilterBuilder whose Filter will be against the
given field name
- Parameters:
name
- Name of the field that will be filteredshape
- Shape used in the filter
relation
public GeoShapeFilterBuilder relation(ShapeRelation relation)
- Sets the
ShapeRelation
that defines how the Shape used in the
Filter must relate to indexed Shapes
- Parameters:
relation
- ShapeRelation used in the filter
- Returns:
- this
cache
public GeoShapeFilterBuilder cache(boolean cache)
- Sets whether the filter will be cached.
- Parameters:
cache
- Whether filter will be cached
- Returns:
- this
cacheKey
public GeoShapeFilterBuilder cacheKey(String cacheKey)
- Sets the key used for the filter if it is cached
- Parameters:
cacheKey
- Key for the Filter if cached
- Returns:
- this
filterName
public GeoShapeFilterBuilder filterName(String filterName)
- Sets the name of the filter
- Parameters:
filterName
- Name of the filter
- Returns:
- this
doXContent
protected void doXContent(XContentBuilder builder,
ToXContent.Params params)
throws IOException
- Specified by:
doXContent
in class BaseFilterBuilder
- Throws:
IOException
Copyright © 2009-2012. All Rights Reserved.