ejsScoreFunction

A basic filter score function, which mathces a filter and applies a weight.

Module

 ScoreFunction

ScoreFunction ( )

Randomly score documents.


Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectfilter(oFilter)Adds a filter whose matching documents will have the score function applied.
StringtoJSON()

Retrieves the internal agg object. This is typically used by internal API functions so use with caution.

Objectweight(oWeight)Sets the weight of the score function

Method Detail

 _type

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

Returns
the type of object

 filter

Object filter ( oFilter )
Adds a filter whose matching documents will have the score function applied.

Parameters
oFilter <Filter> Any valid Filter object.
Returns
returns this so that calls can be chained.

 toJSON

String toJSON ( )

Retrieves the internal agg object. This is typically used by internal API functions so use with caution.


Returns
returns this object's internal object.

 weight

Object weight ( oWeight )
Sets the weight of the score function

Parameters
oWeight <Number> The weight of this score function.
Returns
returns this so that calls can be chained.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo