org.elasticsearch.index.query.xcontent
Class GeoDistanceFilterBuilder

java.lang.Object
  extended by org.elasticsearch.index.query.xcontent.BaseFilterBuilder
      extended by org.elasticsearch.index.query.xcontent.GeoDistanceFilterBuilder
All Implemented Interfaces:
ToXContent, XContentFilterBuilder

public class GeoDistanceFilterBuilder
extends BaseFilterBuilder


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
GeoDistanceFilterBuilder(java.lang.String name)
           
 
Method Summary
 GeoDistanceFilterBuilder cache(boolean cache)
          Should the filter be cached or not.
 GeoDistanceFilterBuilder distance(double distance, DistanceUnit unit)
           
 GeoDistanceFilterBuilder distance(java.lang.String distance)
           
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 GeoDistanceFilterBuilder filterName(java.lang.String filterName)
          Sets the filter name for the filter that can be used when searching for matched_filters per hit.
 GeoDistanceFilterBuilder geoDistance(GeoDistance geoDistance)
           
 GeoDistanceFilterBuilder geohash(java.lang.String geohash)
           
 GeoDistanceFilterBuilder lat(double lat)
           
 GeoDistanceFilterBuilder lon(double lon)
           
 GeoDistanceFilterBuilder point(double lat, double lon)
           
 
Methods inherited from class org.elasticsearch.index.query.xcontent.BaseFilterBuilder
toXContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoDistanceFilterBuilder

public GeoDistanceFilterBuilder(java.lang.String name)
Method Detail

point

public GeoDistanceFilterBuilder point(double lat,
                                      double lon)

lat

public GeoDistanceFilterBuilder lat(double lat)

lon

public GeoDistanceFilterBuilder lon(double lon)

distance

public GeoDistanceFilterBuilder distance(java.lang.String distance)

distance

public GeoDistanceFilterBuilder distance(double distance,
                                         DistanceUnit unit)

geohash

public GeoDistanceFilterBuilder geohash(java.lang.String geohash)

geoDistance

public GeoDistanceFilterBuilder geoDistance(GeoDistance geoDistance)

filterName

public GeoDistanceFilterBuilder filterName(java.lang.String filterName)
Sets the filter name for the filter that can be used when searching for matched_filters per hit.


cache

public GeoDistanceFilterBuilder cache(boolean cache)
Should the filter be cached or not. Defaults to false.


doXContent

protected void doXContent(XContentBuilder builder,
                          ToXContent.Params params)
                   throws java.io.IOException
Specified by:
doXContent in class BaseFilterBuilder
Throws:
java.io.IOException