CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Search\ResultsType Interface Reference

Lightweight classes to describe specific result types we can return. More...

+ Inheritance diagram for CirrusSearch\Search\ResultsType:

Public Member Functions

 getSourceFiltering ()
 Get the source filtering to be used loading the result.
 
 getFields ()
 Get the fields to load.
 
 getHighlightingConfiguration (array $extraHighlightFields)
 Get the highlighting configuration.
 
 transformElasticsearchResult (ElasticaResultSet $resultSet)
 
 createEmptyResult ()
 

Detailed Description

Lightweight classes to describe specific result types we can return.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Member Function Documentation

◆ createEmptyResult()

CirrusSearch\Search\ResultsType::createEmptyResult ( )

◆ getFields()

CirrusSearch\Search\ResultsType::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

Implemented in CirrusSearch\Search\FullTextResultsType, CirrusSearch\Search\SingleAggResultsType, and CirrusSearch\Search\TitleResultsType.

◆ getHighlightingConfiguration()

CirrusSearch\Search\ResultsType::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

Implemented in CirrusSearch\Search\SingleAggResultsType, CirrusSearch\Search\FancyTitleResultsType, CirrusSearch\Search\FullTextResultsType, and CirrusSearch\Search\TitleResultsType.

◆ getSourceFiltering()

CirrusSearch\Search\ResultsType::getSourceFiltering ( )

Get the source filtering to be used loading the result.

Returns
false|string|array corresponding to Elasticsearch source filtering syntax

Implemented in CirrusSearch\Search\BaseResultsType, CirrusSearch\Search\FancyTitleResultsType, CirrusSearch\Search\FullTextResultsType, and CirrusSearch\Search\SingleAggResultsType.

◆ transformElasticsearchResult()

CirrusSearch\Search\ResultsType::transformElasticsearchResult ( ElasticaResultSet $resultSet)
Parameters
ElasticaResultSet$resultSet
Returns
mixed Set of search results, the types of which vary by implementation.

Implemented in CirrusSearch\Search\FancyTitleResultsType, CirrusSearch\Search\SingleAggResultsType, and CirrusSearch\Search\TitleResultsType.


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