ejsTermsFilter

Filters documents that have fields that match any of the provided terms (not analyzed)

Module

 TermsFilter

TermsFilter ( field, terms )
A Filter that matches documents containing provided terms.

Parameters
field <String> the document field/key to filter against
terms <String | String[]> a single term or an array of terms.

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.
ObjectcacheLookup(trueFalse)Enable or disable caching of the lookup
Objectexecution(e)Sets the way terms filter executes is by iterating over the terms provided and finding matches docs (loading into a bitset) and caching it. Valid values are: plain, bool, bool_nocache, and, and_nocache, or, or_nocache. Defaults to plain.
Objectfield(f)Sets the fields to filter against.
Objectid(id)Sets the document id of the document containing the terms to use when performing a terms lookup.
Objectindex(idx)Sets the index the document containing the terms is in when performing a terms lookup. Defaults to the index currently being searched.
Objectname(name)Sets the filter name.
Objectpath(path)Sets the path/field name where the terms in the source document are located when performing a terms lookup.
Objectrouting(path)Sets the routing value for the source document when performing a terms lookup.
Objectterms(t)Sets the terms. If t is a String, it is added to the existing list of terms. If t is an array, the list of terms replaces the existing terms.
ObjecttoJSON()Returns the filter object.
Objecttype(type)Sets the type the document containing the terms when performing a terms lookup.

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.

 cacheLookup

Object cacheLookup ( trueFalse )
Enable or disable caching of the lookup

Parameters
trueFalse <Boolean> True to cache the lookup, false otherwise.
Returns
returns this so that calls can be chained.

 execution

Object execution ( e )
Sets the way terms filter executes is by iterating over the terms provided and finding matches docs (loading into a bitset) and caching it. Valid values are: plain, bool, bool_nocache, and, and_nocache, or, or_nocache. Defaults to plain.

Parameters
e <String> A valid execution method.
Returns
returns this so that calls can be chained.

 field

Object field ( f )
Sets the fields to filter against.

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

 id

Object id ( id )
Sets the document id of the document containing the terms to use when performing a terms lookup.

Since
elasticsearch 0.90
Parameters
id <String> A valid index name.
Returns
returns this so that calls can be chained.

 index

Object index ( idx )
Sets the index the document containing the terms is in when performing a terms lookup. Defaults to the index currently being searched.

Since
elasticsearch 0.90
Parameters
idx <String> A valid index name.
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.

 path

Object path ( path )
Sets the path/field name where the terms in the source document are located when performing a terms lookup.

Since
elasticsearch 0.90
Parameters
path <String> A valid index name.
Returns
returns this so that calls can be chained.

 routing

Object routing ( path )
Sets the routing value for the source document when performing a terms lookup.

Since
elasticsearch 0.90.2
Parameters
path <String> A valid index name.
Returns
returns this so that calls can be chained.

 terms

Object terms ( t )
Sets the terms. If t is a String, it is added to the existing list of terms. If t is an array, the list of terms replaces the existing terms.

Parameters
t <String | String[]> A single term or an array or terms.
Returns
returns this so that calls can be chained.

 toJSON

Object toJSON ( )
Returns the filter object.

Returns
filter object

 type

Object type ( type )
Sets the type the document containing the terms when performing a terms lookup.

Since
elasticsearch 0.90
Parameters
type <String> A valid type name.
Returns
returns this so that calls can be chained.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo