ejsDisMaxQuery

A query that generates the union of documents produced by its subqueries, and that scores each document with the maximum score for that document as produced by any subquery, plus a tie breaking increment for any additional matching subqueries.

Module

 DisMaxQuery

DisMaxQuery ( )
A query that generates the union of documents produced by its subqueries such as termQuerys, phraseQuerys, boolQuerys, etc.

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.
Objectqueries(qs)Updates the queries. If passed a single Query, it is added to the list of existing queries. If passed an array of Queries, it replaces all existing values.
ObjecttieBreaker(tieBreaker)

The tie breaker value.

The tie breaker capability allows results that include the same term in multiple fields to be judged better than results that include this term in only the best of those multiple fields, without confusing this with the better case of two different terms in the multiple fields.

Default: 0.0.

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 <Double> A positive double value.
Returns
returns this so that calls can be chained.

 queries

Object queries ( qs )
Updates the queries. If passed a single Query, it is added to the list of existing queries. If passed an array of Queries, it replaces all existing values.

Parameters
qs <Query | Query[]> A single Query or an array of Queries
Returns
returns this so that calls can be chained.

 tieBreaker

Object tieBreaker ( tieBreaker )

The tie breaker value.

The tie breaker capability allows results that include the same term in multiple fields to be judged better than results that include this term in only the best of those multiple fields, without confusing this with the better case of two different terms in the multiple fields.

Default: 0.0.


Parameters
tieBreaker <Double> A positive double value.
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