ejsTermFilter

Constructs a filter for docs matching any of the terms added to this object. Unlike a RangeFilter this can be used for filtering on multiple terms that are not necessarily in a sequence.

Module

 TermFilter

TermFilter ( fieldName, term )
Constructs a filter for docs matching the term added to this object.

Parameters
fieldName <string> The document field/fieldName to execute the filter against.
term <string> The literal term used to filter the results.

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)Provides access to the filter fieldName used to construct the termFilter object.
Objectname(name)Sets the filter name.
Objectterm()Provides access to the filter term used to construct the termFilter object.
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 )
Provides access to the filter fieldName used to construct the termFilter object.

Parameters
f <String> the fieldName term
Returns
returns this so that calls can be chained. When k is not specified, Returns {String}, the filter fieldName used to construct the termFilter object.

 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.

 term

Object term ( )
Provides access to the filter term used to construct the termFilter object.

Returns
returns this so that calls can be chained. When k is not specified, Returns {String}, the filter term used to construct the termFilter object.

 toJSON

Object toJSON ( )
Returns the filter object.

Returns
filter object

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo