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

Boosts documents in user language and in wiki language if different Uses getUserLanguage in SearchConfig and LanguageCode for language values and CirrusSearchLanguageWeight['user'|'wiki'] for respective weights. More...

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

Public Member Functions

 __construct (SearchConfig $config, $weight, $userLang=null)
 
 append (FunctionScore $functionScore)
 Append functions to the function score $container.
 
- 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

Boosts documents in user language and in wiki language if different Uses getUserLanguage in SearchConfig and LanguageCode for language values and CirrusSearchLanguageWeight['user'|'wiki'] for respective weights.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Search\Rescore\LangWeightFunctionScoreBuilder::__construct ( SearchConfig $config,
$weight,
$userLang = null )
Parameters
SearchConfig$config
float$weight
string | null$userLang

Member Function Documentation

◆ append()

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

Append functions to the function score $container.

Parameters
FunctionScore$container

Implements CirrusSearch\Search\Rescore\BoostFunctionBuilder.


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