Utility class for rebuilding the term_search_key field.
More...
|
| updateSearchKey (IDatabase $dbw, $rowId, $text) |
| Updates a single row with a newley calculated search key.
|
|
| report ( $msg) |
|
Utility class for rebuilding the term_search_key field.
- Deprecated:
- This will disappear after the wb_terms table removal.
- Copyright
- GPL-2.0-or-later
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
-
Jens Ohlig < jens..nosp@m.ohli.nosp@m.g@wik.nosp@m.imed.nosp@m.ia.de >
-
Daniel Kinzler
◆ __construct()
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::__construct |
( |
TermSqlIndex |
$table, |
|
|
LoggerInterface |
$logger |
|
) |
| |
◆ rebuildSearchKey()
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::rebuildSearchKey |
( |
| ) |
|
Rebuild the search key field term_search_key from the source term_text field.
Use the rebuildSearchKey.php maintenance script to invoke this from the command line.
Database updates a batched into multiple transactions. Do not call this method whithin an (explicite) database transaction.
◆ report()
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::report |
( |
|
$msg | ) |
|
|
private |
◆ setBatchSize()
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::setBatchSize |
( |
|
$batchSize | ) |
|
◆ setFromId()
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::setFromId |
( |
|
$fromId | ) |
|
◆ setRebuildAll()
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::setRebuildAll |
( |
|
$all | ) |
|
◆ setReporter()
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::setReporter |
( |
MessageReporter |
$reporter | ) |
|
Sets the reporter to use for reporting preogress.
- Parameters
-
◆ updateSearchKey()
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::updateSearchKey |
( |
IDatabase |
$dbw, |
|
|
|
$rowId, |
|
|
|
$text |
|
) |
| |
|
private |
Updates a single row with a newley calculated search key.
The search key is calculated using TermSqlIndex::getSearchKey().
- See also
- TermSqlIndex::getSearchKey
- Parameters
-
IDatabase | $dbw | the database connection to use |
int | $rowId | the row to update |
string | $text | the term's text |
- Returns
- string|bool the search key, or false if no search key could be calculated.
◆ $all
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::$all = true |
|
private |
◆ $batchSize
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::$batchSize = 100 |
|
private |
◆ $fromId
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::$fromId = 1 |
|
private |
◆ $logger
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::$logger |
|
private |
◆ $reporter
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::$reporter = null |
|
private |
◆ $table
Wikibase\Repo\Store\Sql\TermSearchKeyBuilder::$table |
|
private |
The documentation for this class was generated from the following file: