Module
DecayScoreFunction
DecayScoreFunction ( field )
Score a document with a function that decays depending on the distance of a numeric field value of the document from given origin.
|
Method Summary
Returns | Name | Description |
---|---|---|
String | _type() | The type of ejs object. For internal use only. |
Object | decay(d) | Sets the decay value which defines how documents are scored at the distance given at scale. |
Object | exp() | Use the exp decay function. Exponential decay. |
Object | field(f) | Sets the fields to run the decay function against. |
Object | filter(oFilter) | Adds a filter whose matching documents will have the score function applied. |
Object | gauss() | Use the gauss decay function. Normal decay. |
Object | linear() | Use the linear decay function. Linear decay. |
Object | offset(o) | Sets the decay offset. The decay function will only compute a the decay function for documents with a distance greater that the defined offset. The default is 0. |
Object | origin(o) | Sets the origin which is the “central point” from which the distance is calculated. |
Object | scale(s) | Sets the scale/rate of decay. |
String | toJSON() | Retrieves the internal |
Method Detail
decay
Object decay ( d )
Sets the decay value which defines how documents are scored at the distance
given at scale.
|
exp
Object exp ( )
Use the exp decay function. Exponential decay.
|
field
Object field ( f )
Sets the fields to run the decay function against.
|
filter
Object filter ( oFilter )
Adds a filter whose matching documents will have the score function applied.
|
gauss
Object gauss ( )
Use the gauss decay function. Normal decay.
|
linear
Object linear ( )
Use the linear decay function. Linear decay.
|
offset
Object offset ( o )
Sets the decay offset. The decay function will only compute a the decay
function for documents with a distance greater that the defined offset.
The default is 0.
|
origin
Object origin ( o )
Sets the origin which is the “central point” from which the distance is
calculated.
|
scale
Object scale ( s )
Sets the scale/rate of decay.
|
toJSON
String toJSON ( )
Retrieves the internal
|