CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Search\Rescore\SatuFunctionScoreBuilder Class Reference

Saturation function based on x/(k+x), k is a parameter to control how fast the function saturates. More...

+ Inheritance diagram for CirrusSearch\Search\Rescore\SatuFunctionScoreBuilder:
+ Collaboration diagram for CirrusSearch\Search\Rescore\SatuFunctionScoreBuilder:

Public Member Functions

 __construct (SearchConfig $config, $weight, $profile)
 
 append (FunctionScore $functionScore)
 Append functions to the function score $container.
 
 getScript ()
 
- Public Member Functions inherited from CirrusSearch\Search\Rescore\FunctionScoreBuilder
 __construct ( $config, $weight)
 

Additional Inherited Members

- Protected Member Functions inherited from CirrusSearch\Search\Rescore\FunctionScoreBuilder
 getOverriddenFactor ( $value)
 Utility method to extract a factor (float) that can be overridden by a config value or an URI param.
 
- Protected Attributes inherited from CirrusSearch\Search\Rescore\FunctionScoreBuilder
 $config
 
 $weight
 

Detailed Description

Saturation function based on x/(k+x), k is a parameter to control how fast the function saturates.

NOTE: that satu is always 0.5 when x == k. Parameter a is added to form a sigmoid : x^a/(k^a+x^a) Based on http://research.microsoft.com/pubs/65239/craswell_sigir05.pdf This function is suited to apply a new factor in a weighted sum.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Search\Rescore\SatuFunctionScoreBuilder::__construct ( SearchConfig $config,
$weight,
$profile )
Parameters
SearchConfig$config
float$weight
array$profile
Exceptions
InvalidRescoreProfileException

Member Function Documentation

◆ append()

CirrusSearch\Search\Rescore\SatuFunctionScoreBuilder::append ( FunctionScore $container)

Append functions to the function score $container.

Parameters
FunctionScore$container

Implements CirrusSearch\Search\Rescore\BoostFunctionBuilder.

◆ getScript()

CirrusSearch\Search\Rescore\SatuFunctionScoreBuilder::getScript ( )
Returns
string

The documentation for this class was generated from the following file: