ejsRegexpFilter

Filters documents that have a field value matching a regular expression. Based on Lucene 4.0 RegexpFilter which uses automaton to efficiently iterate over index terms.

Module

 RegexpFilter

RegexpFilter ( field, value )
Matches documents that have fields matching a regular expression.

Parameters
field <String> A valid field name.
value <String> A regex pattern.

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.
Objectflags(f)The regex flags to use. Valid flags are: INTERSECTION - Support for intersection notation COMPLEMENT - Support for complement notation EMPTY - Support for the empty language symbol: # ANYSTRING - Support for the any string symbol: @ INTERVAL - Support for numerical interval notation: NONE - Disable support for all syntax options ALL - Enables support for all syntax options Use multiple flags by separating with a "|" character. Example: INTERSECTION|COMPLEMENT|EMPTY
ObjectflagsValue(v)The regex flags to use as a numeric value. Advanced use only, it is probably better to stick with the flags option.
Objectname(name)Sets the filter name.
ObjecttoJSON()Returns the filter object.
Objectvalue(p)The regexp value.

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.

 flags

Object flags ( f )
The regex flags to use. Valid flags are: INTERSECTION - Support for intersection notation COMPLEMENT - Support for complement notation EMPTY - Support for the empty language symbol: # ANYSTRING - Support for the any string symbol: @ INTERVAL - Support for numerical interval notation: NONE - Disable support for all syntax options ALL - Enables support for all syntax options Use multiple flags by separating with a "|" character. Example: INTERSECTION|COMPLEMENT|EMPTY

Parameters
f <String> The flags as a string, separate multiple flags with "|".
Returns
returns this so that calls can be chained.

 flagsValue

Object flagsValue ( v )
The regex flags to use as a numeric value. Advanced use only, it is probably better to stick with the flags option.

Parameters
v <String> The flags as a numeric value.
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.

 toJSON

Object toJSON ( )
Returns the filter object.

Returns
filter object

 value

Object value ( p )
The regexp value.

Parameters
p <String> A string regexp
Returns
returns this so that calls can be chained.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo