ejsTermQuery

A TermQuery can be used to return documents containing a given keyword or term. For instance, you might want to retieve all the documents/objects that contain the term Javascript. Term filters often serve as the basis for more complex queries such as Boolean queries.

Module

 TermQuery

TermQuery ( field, term )
A Query that matches documents containing a term. This may be combined with other terms with a BooleanQuery.

Parameters
field <String> the document field/key to query against
term <String> the literal value to be matched

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectboost(boost)Sets the boost value for documents matching the Query.
Objectfield(f)Sets the fields to query against.
Objectterm(t)Sets the term.
StringtoJSON()Retrieves the internal query object. This is typically used by internal API functions so use with caution.

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 for documents matching the Query.

Parameters
boost <Number> A positive double value.
Returns
returns this so that calls can be chained.

 field

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

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

 term

Object term ( t )
Sets the term.

Parameters
t <String> A single term.
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.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo