Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Api\CombinedEntitySearchHelper Class Reference

Helper class to search for entities by ID. More...

+ Inheritance diagram for Wikibase\Repo\Api\CombinedEntitySearchHelper:
+ Collaboration diagram for Wikibase\Repo\Api\CombinedEntitySearchHelper:

Public Member Functions

 __construct (array $searchHelpers)
 
 getRankedSearchResults ( $text, $languageCode, $entityType, $limit, $strictLanguage, ?string $profileContext)
 Get entities matching the search term.
Parameters
string$text
string$languageCode
string$entityType
int$limit
bool$strictLanguage
string | null$profileContextindication given to the engine on the context this search is made (might affect ranking)
Returns
TermSearchResult[] Key: string Serialized EntityId
Exceptions
EntitySearchExceptionwhen a problem occurs fetching data from the underlying datastore

 

Private Member Functions

 mergeSearchResults (array $searchResults, array $newSearchResults, $limit)
 

Private Attributes

 $searchHelpers
 

Detailed Description

Helper class to search for entities by ID.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Api\CombinedEntitySearchHelper::__construct ( array $searchHelpers)
Parameters
array$searchHelpersordered array of EntitySearchHelpers to be used.

Member Function Documentation

◆ getRankedSearchResults()

Wikibase\Repo\Api\CombinedEntitySearchHelper::getRankedSearchResults ( $text,
$languageCode,
$entityType,
$limit,
$strictLanguage,
?string $profileContext )

Get entities matching the search term.

Parameters
string$text
string$languageCode
string$entityType
int$limit
bool$strictLanguage
string | null$profileContextindication given to the engine on the context this search is made (might affect ranking)
Returns
TermSearchResult[] Key: string Serialized EntityId
Exceptions
EntitySearchExceptionwhen a problem occurs fetching data from the underlying datastore

Implements Wikibase\Repo\Api\EntitySearchHelper.

◆ mergeSearchResults()

Wikibase\Repo\Api\CombinedEntitySearchHelper::mergeSearchResults ( array $searchResults,
array $newSearchResults,
$limit )
private
Parameters
TermSearchResult[]$searchResults
TermSearchResult[]$newSearchResults
int$limit
Returns
TermSearchResult[]

Member Data Documentation

◆ $searchHelpers

Wikibase\Repo\Api\CombinedEntitySearchHelper::$searchHelpers
private

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