ejsRangeQuery

Matches documents with fields that have terms within a certain range. The type of the Lucene query depends on the field type, for string fields, the TermRangeQuery, while for number/date fields, the query is a NumericRangeQuery.

Module

 RangeQuery

RangeQuery ( field )
Matches 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.
Objectboost(boost)Sets the boost value of the Query.
Objectfield(f)The field to run the query 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.
Objectto(t)The upper bound. Defaults to unbounded.
StringtoJSON()Retrieves the internal query object. This is typically used by internal API functions so use with caution.

Method Detail

 _type

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

Returns
the type of object

 boost

Object boost ( boost )
Sets the boost value of the Query.

Parameters
boost <Double> A positive double value.
Returns
returns this so that calls can be chained.

 field

Object field ( f )
The field to run the query 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.

 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

String toJSON ( )
Retrieves the internal query object. This is typically used by internal API functions so use with caution.

Returns
returns this object's internal query property.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo