Wikibase
MediaWiki Wikibase extension
|
Methods helping search interactors from a term store. More...
Public Member Functions | |
getMatchingTerms (array $criteria, $termType=null, $entityType=null, array $options=[]) | |
Returns the terms that match the provided conditions. | |
getTopMatchingTerms (array $criteria, $termType=null, $entityType=null, array $options=[]) | |
Returns the terms that match the provided conditions ranked with the 'most important' / top first. | |
Methods helping search interactors from a term store.
Wikibase\Lib\Store\MatchingTermsLookup::getMatchingTerms | ( | array | $criteria, |
$termType = null , |
|||
$entityType = null , |
|||
array | $options = [] |
||
) |
Returns the terms that match the provided conditions.
$terms is an array of Term objects. Terms are joined by OR. The fields of the terms are joined by AND.
A default can be provided for termType and entityType via the corresponding method parameters.
TermIndexSearchCriteria[] | $criteria | |
string | string[] | null | $termType | |
string | string[] | null | $entityType | |
array | $options | Accepted options are:
|
Implemented in Wikibase\Lib\Store\NullTermIndex, Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup, Wikibase\Lib\Store\Sql\Terms\TermStoreDelegatingMatchingTermsLookup, and Wikibase\Lib\Store\Sql\TermSqlIndex.
Wikibase\Lib\Store\MatchingTermsLookup::getTopMatchingTerms | ( | array | $criteria, |
$termType = null , |
|||
$entityType = null , |
|||
array | $options = [] |
||
) |
Returns the terms that match the provided conditions ranked with the 'most important' / top first.
Will only return one TermIndexEntry per Entity
$terms is an array of Term objects. Terms are joined by OR. The fields of the terms are joined by AND.
A default can be provided for termType and entityType via the corresponding method parameters.
TermIndexSearchCriteria[] | $criteria | |
string | string[] | null | $termType | |
string | string[] | null | $entityType | |
array | $options | Accepted options are:
|
Implemented in Wikibase\Lib\Store\NullTermIndex, Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup, Wikibase\Lib\Store\Sql\Terms\TermStoreDelegatingMatchingTermsLookup, and Wikibase\Lib\Store\Sql\TermSqlIndex.