CirrusSearch
Elasticsearch-powered search for MediaWiki
|
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. More...
Public Member Functions | |
__construct (Client $client, Printer $out) | |
checkElasticsearchVersion () | |
pickIndexIdentifierFromOption ( $option, $typeName) | |
Pick the index identifier from the provided command line option. | |
getAllIndicesByType ( $typeName) | |
Scan the indices and return the ones that match the type $typeName. | |
scanAvailablePlugins (array $bannedPlugins=[]) | |
scanAvailableModules () | |
waitForGreen ( $indexName, $timeout) | |
Wait for the index to go green. | |
isIndex ( $indexName) | |
Checks if this is an index (not an alias) | |
getIndicesWithAlias ( $aliasName) | |
Return a list of index names that points to $aliasName. | |
isIndexLive ( $indexName) | |
Returns true is this is an index thats never been unsed. | |
Protected Member Functions | |
output ( $message, $channel=null) | |
outputIndented ( $message) | |
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
CirrusSearch\Maintenance\ConfigUtils::__construct | ( | Client | $client, |
Printer | $out ) |
Client | $client | |
Printer | $out |
CirrusSearch\Maintenance\ConfigUtils::getAllIndicesByType | ( | $typeName | ) |
Scan the indices and return the ones that match the type $typeName.
string | $typeName | the type to filter with |
CirrusSearch\Maintenance\ConfigUtils::getIndicesWithAlias | ( | $aliasName | ) |
Return a list of index names that points to $aliasName.
string | $aliasName |
CirrusSearch\Maintenance\ConfigUtils::isIndex | ( | $indexName | ) |
Checks if this is an index (not an alias)
string | $indexName |
CirrusSearch\Maintenance\ConfigUtils::isIndexLive | ( | $indexName | ) |
Returns true is this is an index thats never been unsed.
Used as a pre-check when deleting indices. This checks that there are no aliases pointing at it, as all traffic flows through aliases. It additionally checks the index stats to verify it's never been queried.
$indexName should be an index and it should exist. If it is an alias or the index does not exist a fatal status will be returned.
string | $indexName | The specific name of the index |
|
protected |
string | $message | |
mixed | null | $channel |
|
protected |
string | $message |
CirrusSearch\Maintenance\ConfigUtils::pickIndexIdentifierFromOption | ( | $option, | |
$typeName ) |
Pick the index identifier from the provided command line option.
string | $option | command line option 'now' => current time 'current' => if there is just one index for this type then use its identifier other string => that string back |
string | $typeName |
CirrusSearch\Maintenance\ConfigUtils::scanAvailableModules | ( | ) |
CirrusSearch\Maintenance\ConfigUtils::scanAvailablePlugins | ( | array | $bannedPlugins = [] | ) |
string[] | $bannedPlugins |
CirrusSearch\Maintenance\ConfigUtils::waitForGreen | ( | $indexName, | |
$timeout ) |
Wait for the index to go green.
string | $indexName | |
int | $timeout |