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

Normalize values in the [0,1] range Allows to set: More...

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

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

Normalize values in the [0,1] range Allows to set:

  • a scale
  • midpoint It will generate a log scale factor where :
  • f(0) = 0
  • f(scale) = 1
  • f(midpoint) = 0.5

Based on log10( a . x + 1 ) / log10( a . M + 1 ) a: a factor used to adjust the midpoint M: the max value used to scale

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ append()

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

Append functions to the function score $container.

Parameters
FunctionScore$container

Implements CirrusSearch\Search\Rescore\BoostFunctionBuilder.

◆ getScript()

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

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