ejsRegexpQuery

Matches documents that have fields matching a regular expression. Based on Lucene 4.0 RegexpQuery which uses automaton to efficiently iterate over index terms.

Module

 RegexpQuery

RegexpQuery ( 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.
Objectboost(boost)Sets the boost value of the Query.
Objectfield(f)The field to run the query 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.
Objectrewrite(m)Sets rewrite method. Valid values are: constant_score_auto - tries to pick the best constant-score rewrite method based on term and document counts from the query scoring_boolean - translates each term into boolean should and keeps the scores as computed by the query constant_score_boolean - same as scoring_boolean, expect no scores are computed. constant_score_filter - first creates a private Filter, by visiting each term in sequence and marking all docs for that term top_terms_boost_N - first translates each term into boolean should and scores are only computed as the boost using the top N scoring terms. Replace N with an integer value. top_terms_N - first translates each term into boolean should and keeps the scores as computed by the query. Only the top N scoring terms are used. Replace N with an integer value. Default is constant_score_auto. This is an advanced option, use with care.
StringtoJSON()Retrieves the internal query object. This is typically used by internal API functions so use with caution.
Objectvalue(p)The regexp value.

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.

 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.

 rewrite

Object rewrite ( m )
Sets rewrite method. Valid values are: constant_score_auto - tries to pick the best constant-score rewrite method based on term and document counts from the query scoring_boolean - translates each term into boolean should and keeps the scores as computed by the query constant_score_boolean - same as scoring_boolean, expect no scores are computed. constant_score_filter - first creates a private Filter, by visiting each term in sequence and marking all docs for that term top_terms_boost_N - first translates each term into boolean should and scores are only computed as the boost using the top N scoring terms. Replace N with an integer value. top_terms_N - first translates each term into boolean should and keeps the scores as computed by the query. Only the top N scoring terms are used. Replace N with an integer value. Default is constant_score_auto. This is an advanced option, use with care.

Parameters
m <String> The rewrite method as a string.
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.

 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