Class: module:models/TermQuery

module:models/TermQuery(fields, operator)

new module:models/TermQuery(fields, operator)

Constructs a new TermQuery. A term query matches one (or more) value(s) against one (or more) document field(s). A document is considered a hit if one of the values matches (exactly) with at least one of the given fields. The operator "is" can only take one value, while "one_of" can take multiple values. If multiple fields are specified, they are combined using the OR operator. The

Parameters:
Name Type Description
fields Array.<String>

The document field(s), the value(s) are matched against, combined with the operator.

operator module:models/TermQuery.OperatorEnum

Returns the operator to use for the term query.

Source:

Members

(readonly) OperatorEnum :String

Allowed values for the operator property.

Type:
  • String
Source:

(inner) fields :Array.<String>

The document field(s), the value(s) are matched against, combined with the operator.

Type:
  • Array.<String>
Source:

(inner, constant) greater

value: "greater"

Source:

(inner, constant) is

value: "is"

Source:

(inner, constant) is_not_null

value: "is_not_null"

Source:

(inner, constant) is_null

value: "is_null"

Source:

(inner, constant) less

value: "less"

Source:

(inner, constant) neq

value: "neq"

Source:

(inner, constant) not_in

value: "not_in"

Source:

(inner, constant) one_of

value: "one_of"

Source:

(inner) operator :module:models/TermQuery.OperatorEnum

Returns the operator to use for the term query.

Type:
  • module:models/TermQuery.OperatorEnum
Source:

(inner) values :Array.<Object>

The values, the field(s) are compared against, combined with the operator.

Type:
  • Array.<Object>
Source:

Methods

(static) constructFromObject(data, obj) → {module:models/TermQuery}

Constructs a TermQuery from a plain JavaScript object, optionally creating a new instance. Copies all relevant properties from data to obj if supplied or a new instance if not.

Parameters:
Name Type Description
data Object

The plain JavaScript object bearing properties of interest.

obj module:models/TermQuery

Optional instance to populate.

Source:
Returns:

The populated TermQuery instance.

Type
module:models/TermQuery