Module
GeoDistanceFacet
GeoDistanceFacet ( name )
A facet which provides information over a range of distances from a provided point.
|
Method Summary
Returns | Name | Description |
---|---|---|
String | _type() | The type of ejs object. For internal use only. |
Object | addRange(from,to) | Adds a new bounded range. |
Object | addUnboundedFrom(from) | Adds a new unbounded lower limit. |
Object | addUnboundedTo(to) | Adds a new unbounded upper limit. |
Object | cacheFilter(trueFalse) | Enables caching of the |
Object | distanceType(type) | How to compute the distance. Can either be arc (better precision) or plane (faster). Defaults to arc. |
Object | facetFilter(oFilter) | Allows you to reduce the documents used for computing facet results. |
Object | field(fieldName) | Sets the document field containing the geo-coordinate to be used to calculate the distance. Defaults to "location". |
Object | global(trueFalse) | Computes values across the entire index |
Object | lang(language) | The script language being used. Currently supported values are
javascript , groovy , and mvel . |
Object | mode(m) | Sets the mode the facet will use.
|
Object | nested(path) | Sets the path to the nested document if faceting against a nested field. |
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 |
Object | params(p) | Sets parameters that will be applied to the script. Overwrites any existing params. |
Object | point(p) | Sets the point of origin from where distances will be measured. |
Object | scope(scope) | Computes values across the the specified scope |
String | toJSON() | Retrieves the internal |
Object | unit(unit) | Sets the distance unit. Valid values are "mi" for miles or "km" for kilometers. Defaults to "km". |
Object | valueField(fieldName) | Allows you to specify a different value field to aggrerate over. |
Object | valueScript(scriptCode) | Allows you modify the value field using a script. The modified value
is then used to compute the statistical data. |
Method Detail
addRange
Object addRange ( from, to )
Adds a new bounded range.
|
addUnboundedFrom
Object addUnboundedFrom ( from )
Adds a new unbounded lower limit.
|
addUnboundedTo
Object addUnboundedTo ( to )
Adds a new unbounded upper limit.
|
cacheFilter
Object cacheFilter ( trueFalse )
Enables caching of the
|
distanceType
Object distanceType ( type )
How to compute the distance. Can either be arc (better precision)
or plane (faster). Defaults to arc.
|
facetFilter
Object facetFilter ( oFilter )
Allows you to reduce the documents used for computing facet results.
|
field
Object field ( fieldName )
Sets the document field containing the geo-coordinate to be used
to calculate the distance. Defaults to "location".
|
global
Object global ( trueFalse )
Computes values across the entire index
|
lang
Object lang ( language )
The script language being used. Currently supported values are
javascript , groovy , and mvel .
|
mode
Object mode ( m )
Sets the mode the facet will use.
|
nested
Object nested ( path )
Sets the path to the nested document if faceting against a nested field.
|
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
|
params
Object params ( p )
Sets parameters that will be applied to the script. Overwrites
any existing params.
|
point
Object point ( p )
Sets the point of origin from where distances will be measured.
|
scope
Object scope ( scope )
Computes values across the the specified scope
|
toJSON
String toJSON ( )
Retrieves the internal
|
unit
Object unit ( unit )
Sets the distance unit. Valid values are "mi" for miles or "km"
for kilometers. Defaults to "km".
|
valueField
Object valueField ( fieldName )
Allows you to specify a different value field to aggrerate over.
|
valueScript
Object valueScript ( scriptCode )
Allows you modify the value field using a script. The modified value
is then used to compute the statistical data.
|