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

Class holding the building state of the fetch phase elements of an elasticsearch query. More...

+ Inheritance diagram for CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder:
+ Collaboration diagram for CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder:

Public Member Functions

 __construct (SearchConfig $config, $factoryGroup=null, bool $provideAllSnippets=false)
 
 newHighlightField ( $name, $target, $priority=HighlightedField::DEFAULT_TARGET_PRIORITY)
 @inheritDoc
 
 addNewRegexHLField ( $name, $target, $pattern, $caseInsensitive, $priority=HighlightedField::COSTLY_EXPERT_SYNTAX_PRIORITY)
 
 supportsRegexFields ()
 Whether this builder can generate regex fields.
 
 newRegexField ( $name, $target, $pattern, $caseInsensitive, $priority=HighlightedField::COSTLY_EXPERT_SYNTAX_PRIORITY)
 @inheritDoc
 
 addHLField (HighlightedField $field)
 
 getHLField ( $field)
 
 buildHLConfig (?AbstractQuery $mainHLQuery=null)
 
 withConfig (SearchConfig $config)
 
 getHLFieldsPerTargetAndPriority ()
 Return the list of highlighted fields indexed per target and ordered by priority (reverse natural order)
 
 configureDefaultFullTextFields ()
 

Detailed Description

Class holding the building state of the fetch phase elements of an elasticsearch query.

Currently only supports the highlight section but can be extended to support source filtering and stored field.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder::__construct ( SearchConfig $config,
$factoryGroup = null,
bool $provideAllSnippets = false )
Parameters
SearchConfig$config
string | null$factoryGroup
bool$provideAllSnippets

Member Function Documentation

◆ addHLField()

CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder::addHLField ( HighlightedField $field)
Parameters
HighlightedField$field

◆ addNewRegexHLField()

CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder::addNewRegexHLField ( $name,
$target,
$pattern,
$caseInsensitive,
$priority = HighlightedField::COSTLY_EXPERT_SYNTAX_PRIORITY )
Parameters
string$name
string$target
string$pattern
bool$caseInsensitive
int$priority

◆ buildHLConfig()

CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder::buildHLConfig ( ?AbstractQuery $mainHLQuery = null)
Parameters
AbstractQuery | null$mainHLQuery
Returns
array

◆ getHLField()

CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder::getHLField ( $field)
Parameters
string$field
Returns
HighlightedField|null

◆ getHLFieldsPerTargetAndPriority()

CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder::getHLFieldsPerTargetAndPriority ( )

Return the list of highlighted fields indexed per target and ordered by priority (reverse natural order)

Returns
HighlightedField[][]

◆ newHighlightField()

CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder::newHighlightField ( $name,
$target,
$priority = HighlightedField::DEFAULT_TARGET_PRIORITY )

◆ newRegexField()

CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder::newRegexField ( $name,
$target,
$pattern,
$caseInsensitive,
$priority = HighlightedField::COSTLY_EXPERT_SYNTAX_PRIORITY )

◆ supportsRegexFields()

CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder::supportsRegexFields ( )

Whether this builder can generate regex fields.

Returns
bool

Implements CirrusSearch\Search\Fetch\HighlightFieldGenerator.

◆ withConfig()

CirrusSearch\Search\Fetch\FetchPhaseConfigBuilder::withConfig ( SearchConfig $config)
Parameters
SearchConfig$config
Returns
FetchPhaseConfigBuilder

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