ejsIndicesFilter

The indices filter can be used when executed across multiple indices, allowing to have a filter that executes only when executed on an index that matches a specific list of indices, and another filter that executes when it is executed on an index that does not match the listed indices.

Module

 IndicesFilter

IndicesFilter ( fltr, indices )
A configurable filter that is dependent on the index name.

Parameters
fltr <Object> A valid filter object.
indices <String | String[]> a single index name or an array of index names.

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.
Objectfilter(f)Sets the filter to be used when executing on one of the indicies specified.
Objectindices(i)Sets the indicies the filter should match. When passed a string, the index name is added to the current list of indices. When passed an array, it overwites all current indices.
Objectname(name)Sets the filter name.
ObjectnoMatchFilter(f)Sets the filter to be used on an index that does not match an index name in the indices list. Can also be set to "none" to not match any documents or "all" to match all documents.
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.

 filter

Object filter ( f )
Sets the filter to be used when executing on one of the indicies specified.

Parameters
f <Object> A valid Filter object
Returns
returns this so that calls can be chained.

 indices

Object indices ( i )
Sets the indicies the filter should match. When passed a string, the index name is added to the current list of indices. When passed an array, it overwites all current indices.

Parameters
i <String | String[]> A single index name or an array of index names.
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.

 noMatchFilter

Object noMatchFilter ( f )
Sets the filter to be used on an index that does not match an index name in the indices list. Can also be set to "none" to not match any documents or "all" to match all documents.

Parameters
f <Filter | String> A valid Filter object or "none" or "all"
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