MatchingTermsLookup implementation in the new term store.
More...
|
| __construct (RepoDomainDb $repoDb, TypeIdsAcquirer $typeIdsAcquirer, TypeIdsResolver $typeIdsResolver, EntityIdComposer $entityIdComposer, LoggerInterface $logger) |
|
| 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.- Parameters
-
TermIndexSearchCriteria[] | $criteria | |
string | string[] | null | $termType | |
string | string[] | null | $entityType | |
array | $options | Accepted options are:
- caseSensitive: boolean, default true
- prefixSearch: boolean, default false
- LIMIT: int, defaults to none
- orderByWeight: boolean, default false
|
- Returns
- TermIndexEntry[]
|
|
MatchingTermsLookup implementation in the new term store.
Mostly used for search.
- See also
- Item & Property Terms
- Copyright
- GPL-2.0-or-later
◆ __construct()
◆ buildTermResult()
Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::buildTermResult |
( |
array |
$results, |
|
|
?int |
$limit = null |
|
) |
| |
|
private |
Modifies the provided terms to use the field names expected by the interface rather then the table field names.
Also ensures the values are of the correct type.
- Parameters
-
IResultWrapper[] | $results | |
int | null | $limit | |
- Returns
- TermIndexEntry[]
◆ criteriaToQueryResults()
Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::criteriaToQueryResults |
( |
IReadableDatabase |
$dbr, |
|
|
array |
$criteria, |
|
|
|
$termType = null , |
|
|
|
$entityType = null , |
|
|
array |
$options = [] |
|
) |
| |
|
private |
- Parameters
-
IReadableDatabase | $dbr | Used for query construction and selects |
TermIndexSearchCriteria[] | $criteria | |
string | string[] | null | $termType | |
string | string[] | null | $entityType | |
array | $options | |
- Returns
- IResultWrapper[]
◆ getDbr()
Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::getDbr |
( |
| ) |
|
|
private |
◆ getEntityId()
Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::getEntityId |
( |
object |
$termRow | ) |
|
|
private |
◆ getMatchingTerms()
Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::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.
- Parameters
-
TermIndexSearchCriteria[] | $criteria | |
string | string[] | null | $termType | |
string | string[] | null | $entityType | |
array | $options | Accepted options are:
- caseSensitive: boolean, default true
- prefixSearch: boolean, default false
- LIMIT: int, defaults to none
- orderByWeight: boolean, default false
|
- Returns
- TermIndexEntry[]
Implements Wikibase\Lib\Store\MatchingTermsLookup.
◆ getTermMatchQueries()
Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::getTermMatchQueries |
( |
IReadableDatabase |
$dbr, |
|
|
TermIndexSearchCriteria |
$mask, |
|
|
string |
$entityType, |
|
|
|
$termType = null , |
|
|
array |
$options = [] |
|
) |
| |
|
private |
- Parameters
-
IReadableDatabase | $dbr | Used for query construction and selects |
TermIndexSearchCriteria | $mask | |
string | $entityType | |
string | string[] | null | $termType | |
array | $options | |
- Returns
- IResultWrapper
◆ $entityIdComposer
EntityIdComposer Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::$entityIdComposer |
|
private |
◆ $logger
LoggerInterface Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::$logger |
|
private |
◆ $repoDb
RepoDomainDb Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::$repoDb |
|
private |
◆ $typeIdsAcquirer
TypeIdsAcquirer Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::$typeIdsAcquirer |
|
private |
◆ $typeIdsResolver
TypeIdsResolver Wikibase\Lib\Store\Sql\Terms\DatabaseMatchingTermsLookup::$typeIdsResolver |
|
private |
The documentation for this class was generated from the following file: