org.elasticsearch.index.query
Class GeoBoundingBoxFilterBuilder

java.lang.Object
  extended by org.elasticsearch.index.query.BaseFilterBuilder
      extended by org.elasticsearch.index.query.GeoBoundingBoxFilterBuilder
All Implemented Interfaces:
ToXContent, FilterBuilder

public class GeoBoundingBoxFilterBuilder
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
GeoBoundingBoxFilterBuilder(String name)
           
 
Method Summary
 GeoBoundingBoxFilterBuilder bottomRight(double lat, double lon)
          Adds bottom right point.
 GeoBoundingBoxFilterBuilder bottomRight(String geohash)
           
 GeoBoundingBoxFilterBuilder cache(boolean cache)
          Should the filter be cached or not.
 GeoBoundingBoxFilterBuilder cacheKey(String cacheKey)
           
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 GeoBoundingBoxFilterBuilder filterName(String filterName)
          Sets the filter name for the filter that can be used when searching for matched_filters per hit.
 GeoBoundingBoxFilterBuilder topLeft(double lat, double lon)
          Adds top left point.
 GeoBoundingBoxFilterBuilder topLeft(String geohash)
           
 GeoBoundingBoxFilterBuilder type(String type)
          Sets the type of executing of the geo bounding box.
 
Methods inherited from class org.elasticsearch.index.query.BaseFilterBuilder
toXContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoBoundingBoxFilterBuilder

public GeoBoundingBoxFilterBuilder(String name)
Method Detail

topLeft

public GeoBoundingBoxFilterBuilder topLeft(double lat,
                                           double lon)
Adds top left point.

Parameters:
lat - The latitude
lon - The longitude

bottomRight

public GeoBoundingBoxFilterBuilder bottomRight(double lat,
                                               double lon)
Adds bottom right point.

Parameters:
lat - The latitude
lon - The longitude

topLeft

public GeoBoundingBoxFilterBuilder topLeft(String geohash)

bottomRight

public GeoBoundingBoxFilterBuilder bottomRight(String geohash)

filterName

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


cache

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


cacheKey

public GeoBoundingBoxFilterBuilder cacheKey(String cacheKey)

type

public GeoBoundingBoxFilterBuilder type(String type)
Sets the type of executing of the geo bounding box. Can be either `memory` or `indexed`. Defaults to `memory`.


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.