ejsBoostingQuery

The boosting query can be used to effectively demote results that match a given query. Unlike the “NOT” clause in bool query, this still selects documents that contain undesirable terms, but reduces their overall score.

Module

 BoostingQuery

BoostingQuery ( positiveQry, negativeQry, negativeBoost )

Constructs a query that can demote search results. A negative boost.


Parameters
positiveQry <Object> Valid query object used to select all matching docs.
negativeQry <Object> Valid query object to match the undesirable docs returned within the positiveQry result set.
negativeBoost <Double> A double value where 0 < n < 1.

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.
Objectnegative(oQuery)Sets the query used to match documents in the positive query that will be negatively boosted.
ObjectnegativeBoost(boost)Sets the negative boost value.
Objectpositive(oQuery)Sets the "master" query that determines which results are returned.
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.

 negative

Object negative ( oQuery )
Sets the query used to match documents in the positive query that will be negatively boosted.

Parameters
oQuery <Object> A valid Query object
Returns
returns this so that calls can be chained. Returns {Object} current negative query if oQuery is not specified.

 negativeBoost

Object negativeBoost ( boost )
Sets the negative boost value.

Parameters
boost <Double> A positive double value where 0 < n < 1.
Returns
returns this so that calls can be chained.

 positive

Object positive ( oQuery )
Sets the "master" query that determines which results are returned.

Parameters
oQuery <Object> A valid Query object
Returns
returns this so that calls can be chained. Returns {Object} current positive query if oQuery is not specified.

 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