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

Result type for aggregations. More...

+ Inheritance diagram for CirrusSearch\Search\SingleAggResultsType:
+ Collaboration diagram for CirrusSearch\Search\SingleAggResultsType:

Public Member Functions

 __construct ( $name)
 
 getSourceFiltering ()
 
 getFields ()
 Get the fields to load.
 
 getHighlightingConfiguration (array $extraHighlightFields)
 Get the highlighting configuration.
 
 transformElasticsearchResult (ElasticaResultSet $resultSet)
 
 createEmptyResult ()
 

Detailed Description

Result type for aggregations.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Search\SingleAggResultsType::__construct ( $name)
Parameters
string$nameName of aggregation to return

Member Function Documentation

◆ createEmptyResult()

CirrusSearch\Search\SingleAggResultsType::createEmptyResult ( )
Returns
null

Implements CirrusSearch\Search\ResultsType.

◆ getFields()

CirrusSearch\Search\SingleAggResultsType::getFields ( )

Get the fields to load.

Most of the time we'll use source filtering instead but some fields aren't part of the source.

Returns
array corresponding to Elasticsearch fields syntax

Implements CirrusSearch\Search\ResultsType.

◆ getHighlightingConfiguration()

CirrusSearch\Search\SingleAggResultsType::getHighlightingConfiguration ( array $extraHighlightFields)

Get the highlighting configuration.

Parameters
array$extraHighlightFieldsconfiguration for how to highlight regex matches. Empty if regex should be ignored.
Returns
array|null highlighting configuration for elasticsearch

Implements CirrusSearch\Search\ResultsType.

◆ getSourceFiltering()

CirrusSearch\Search\SingleAggResultsType::getSourceFiltering ( )
Returns
false|string|array corresponding to Elasticsearch source filtering syntax

Implements CirrusSearch\Search\ResultsType.

◆ transformElasticsearchResult()

CirrusSearch\Search\SingleAggResultsType::transformElasticsearchResult ( ElasticaResultSet $resultSet)
Parameters
ElasticaResultSet$resultSet
Returns
mixed|null Type depends on the aggregation performed. For a sum this will return an integer.

Implements CirrusSearch\Search\ResultsType.


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