ejsRescore

A method that allows to rescore queries with a typically more expensive.

Module

 Rescore

Rescore ( windowSize, windowSize )

Defines an operation that rescores a query with another query.


Parameters
windowSize <Number> The optional number of documents to reorder per shard.
windowSize <Query> The optional query to use for rescoring.

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
ObjectqueryWeight(weight)Sets the weight assigned to the original query of the rescoring.
ObjectrescoreQuery(someQuery)Sets the query used by the rescoring.
ObjectrescoreQueryWeight(weight)Sets the weight assigned to the query used to rescore the original query.
ObjectscoreMode(s)Sets the scoring mode. Valid values are: total - default mode, the scores combined multiply - the scores multiplied min - the lowest of the scores max - the highest score avg - the average of the scores
StringtoJSON()Retrieves the internal script object. This is typically used by internal API functions so use with caution.
ObjectwindowSize(size)Sets the window_size parameter of the rescoring.

Method Detail

 _type

String _type ( )
The type of ejs object. For internal use only.

Returns
the type of object

 queryWeight

Object queryWeight ( weight )
Sets the weight assigned to the original query of the rescoring.

Parameters
weight <Number> a valid query weight.
Returns
returns this so that calls can be chained.

 rescoreQuery

Object rescoreQuery ( someQuery )
Sets the query used by the rescoring.

Parameters
someQuery <Query> a valid query.
Returns
returns this so that calls can be chained.

 rescoreQueryWeight

Object rescoreQueryWeight ( weight )
Sets the weight assigned to the query used to rescore the original query.

Parameters
weight <Number> a valid rescore query weight.
Returns
returns this so that calls can be chained.

 scoreMode

Object scoreMode ( s )
Sets the scoring mode. Valid values are: total - default mode, the scores combined multiply - the scores multiplied min - the lowest of the scores max - the highest score avg - the average of the scores

Parameters
s <String> The score mode as a string.
Returns
returns this so that calls can be chained.

 toJSON

String toJSON ( )
Retrieves the internal script object. This is typically used by internal API functions so use with caution.

Returns
returns this object's internal object representation.

 windowSize

Object windowSize ( size )
Sets the window_size parameter of the rescoring.

Parameters
size <Number> a valid window size.
Returns
returns this so that calls can be chained.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo