ejsGeoBboxFilter

A filter that restricts matched results/docs to a geographic bounding box described by the specified lon and lat coordinates. The format conforms with the GeoJSON specification.

Module

 GeoBboxFilter

GeoBboxFilter ( fieldName )
Filter results to those which are contained within the defined bounding box.

Parameters
fieldName <String> the document property/field containing the Geo Point (lon/lat).

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
ObjectbottomRight(p)Sets the bottom-right coordinate of the bounding box
Objectcache(trueFalse)Enable or disable caching of the filter
ObjectcacheKey(key)Sets the cache key.
Objectfield(f)Sets the fields to filter against.
Objectname(name)Sets the filter name.
Objectnormalize(trueFalse)If the lat/long points should be normalized to lie within their respective normalized ranges. Normalized ranges are: lon = -180 (exclusive) to 180 (inclusive) range lat = -90 to 90 (both inclusive) range
ObjecttoJSON()Returns the filter object.
ObjecttopLeft(p)Sets the top-left coordinate of the bounding box
Objecttype(type)Sets the type of the bounding box execution. Valid values are "memory" and "indexed". Default is memory.

Method Detail

 _type

String _type ( )
The type of ejs object. For internal use only.

Returns
the type of object

 bottomRight

Object bottomRight ( p )
Sets the bottom-right coordinate of the bounding box

Parameters
p <GeoPoint> A valid GeoPoint object
Returns
returns this so that calls can be chained.

 cache

Object cache ( trueFalse )
Enable or disable caching of the filter

Parameters
trueFalse <Boolean> True to cache the filter, false otherwise.
Returns
returns this so that calls can be chained.

 cacheKey

Object cacheKey ( key )
Sets the cache key.

Parameters
key <String> the cache key as a string.
Returns
returns this so that calls can be chained.

 field

Object field ( f )
Sets the fields to filter against.

Parameters
f <String> A valid field name.
Returns
returns this so that calls can be chained.

 name

Object name ( name )
Sets the filter name.

Parameters
name <String> A name for the filter.
Returns
returns this so that calls can be chained.

 normalize

Object normalize ( trueFalse )
If the lat/long points should be normalized to lie within their respective normalized ranges. Normalized ranges are: lon = -180 (exclusive) to 180 (inclusive) range lat = -90 to 90 (both inclusive) range

Parameters
trueFalse <String> True if the coordinates should be normalized. False otherwise.
Returns
returns this so that calls can be chained.

 toJSON

Object toJSON ( )
Returns the filter object.

Returns
filter object

 topLeft

Object topLeft ( p )
Sets the top-left coordinate of the bounding box

Parameters
p <GeoPoint> A valid GeoPoint object
Returns
returns this so that calls can be chained.

 type

Object type ( type )
Sets the type of the bounding box execution. Valid values are "memory" and "indexed". Default is memory.

Parameters
type <String> The execution type as a string.
Returns
returns this so that calls can be chained.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo