ejsRangeFilter

Matches documents with fields that have terms within a certain range.

Module

 RangeFilter

RangeFilter ( field )
Filters documents with fields that have terms within a certain range.

Parameters
field <String> A valid field name.

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectcache(trueFalse)Enable or disable caching of the filter
ObjectcacheKey(key)Sets the cache key.
Objectfield(f)The field to run the filter against.
Objectfrom(f)The lower bound. Defaults to start from the first.
Objectgt(val)Greater than value. Same as setting from to the value, and include_lower to false,
Objectgte(val)Greater than or equal to value. Same as setting from to the value, and include_lower to true.
ObjectincludeLower(trueFalse)Should the first from (if set) be inclusive or not. Defaults to true
ObjectincludeUpper(trueFalse)Should the last to (if set) be inclusive or not. Defaults to true.
Objectlt(val)Less than value. Same as setting to to the value, and include_upper to false.
Objectlte(val)Less than or equal to value. Same as setting to to the value, and include_upper to true.
Objectname(name)Sets the filter name.
Objectto(t)The upper bound. Defaults to unbounded.
ObjecttoJSON()Returns the filter object.

Method Detail

 _type

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

Returns
the type of object

 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 )
The field to run the filter against.

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

 from

Object from ( f )
The lower bound. Defaults to start from the first.

Parameters
f <*> the lower bound value, type depends on field type
Returns
returns this so that calls can be chained.

 gt

Object gt ( val )
Greater than value. Same as setting from to the value, and include_lower to false,

Parameters
val <*> the value, type depends on field type
Returns
returns this so that calls can be chained.

 gte

Object gte ( val )
Greater than or equal to value. Same as setting from to the value, and include_lower to true.

Parameters
val <*> the value, type depends on field type
Returns
returns this so that calls can be chained.

 includeLower

Object includeLower ( trueFalse )
Should the first from (if set) be inclusive or not. Defaults to true

Parameters
trueFalse <Boolean> true to include, false to exclude
Returns
returns this so that calls can be chained.

 includeUpper

Object includeUpper ( trueFalse )
Should the last to (if set) be inclusive or not. Defaults to true.

Parameters
trueFalse <Boolean> true to include, false to exclude
Returns
returns this so that calls can be chained.

 lt

Object lt ( val )
Less than value. Same as setting to to the value, and include_upper to false.

Parameters
val <*> the value, type depends on field type
Returns
returns this so that calls can be chained.

 lte

Object lte ( val )
Less than or equal to value. Same as setting to to the value, and include_upper to true.

Parameters
val <*> the value, type depends on field type
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.

 to

Object to ( t )
The upper bound. Defaults to unbounded.

Parameters
t <*> the upper bound value, type depends on field type
Returns
returns this so that calls can be chained.

 toJSON

Object toJSON ( )
Returns the filter object.

Returns
filter object

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo