Class: module:models/TextQuery

module:models/TextQuery(fields, searchPhrase)

new module:models/TextQuery(fields, searchPhrase)

Constructs a new TextQuery. A text query is used to match some text (i.e. a search phrase possibly consisting of multiple terms) against one or multiple fields. In case multiple fields are provided, the phrase conceptually forms a logical OR over the fields. In this case, the terms of the phrase basically have to match within the text, that would result in concatenating all given fields.

Parameters:
Name Type Description
fields Array.<String>

The document fields the search phrase has to match against.

searchPhrase String

A search phrase, which may consist of multiple terms.

Source:

Members

(inner) fields :Array.<String>

The document fields the search phrase has to match against.

Type:
  • Array.<String>
Source:

(inner) search_phrase :String

A search phrase, which may consist of multiple terms.

Type:
  • String
Source:

Methods

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

Constructs a TextQuery 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/TextQuery

Optional instance to populate.

Source:
Returns:

The populated TextQuery instance.

Type
module:models/TextQuery