CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Maintenance\ConfigUtils Class Reference

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.
 

Protected Member Functions

 output ( $message, $channel=null)
 
 outputIndented ( $message)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Maintenance\ConfigUtils::__construct ( Client $client,
Printer $out )
Parameters
Client$client
Printer$out

Member Function Documentation

◆ getAllIndicesByType()

CirrusSearch\Maintenance\ConfigUtils::getAllIndicesByType ( $typeName)

Scan the indices and return the ones that match the type $typeName.

Parameters
string$typeNamethe type to filter with
Returns
string[] the list of indices

◆ getIndicesWithAlias()

CirrusSearch\Maintenance\ConfigUtils::getIndicesWithAlias ( $aliasName)

Return a list of index names that points to $aliasName.

Parameters
string$aliasName
Returns
string[] index names

◆ isIndex()

CirrusSearch\Maintenance\ConfigUtils::isIndex ( $indexName)

Checks if this is an index (not an alias)

Parameters
string$indexName
Returns
bool true if this is an index, false if it's an alias or if unknown

◆ output()

CirrusSearch\Maintenance\ConfigUtils::output ( $message,
$channel = null )
protected
Parameters
string$message
mixed | null$channel

◆ outputIndented()

CirrusSearch\Maintenance\ConfigUtils::outputIndented ( $message)
protected
Parameters
string$message

◆ pickIndexIdentifierFromOption()

CirrusSearch\Maintenance\ConfigUtils::pickIndexIdentifierFromOption ( $option,
$typeName )

Pick the index identifier from the provided command line option.

Parameters
string$optioncommand 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
Returns
string index identifier to use

◆ scanAvailableModules()

CirrusSearch\Maintenance\ConfigUtils::scanAvailableModules ( )
Returns
string[]

◆ scanAvailablePlugins()

CirrusSearch\Maintenance\ConfigUtils::scanAvailablePlugins ( array $bannedPlugins = [])
Parameters
string[]$bannedPlugins
Returns
string[]

◆ waitForGreen()

CirrusSearch\Maintenance\ConfigUtils::waitForGreen ( $indexName,
$timeout )

Wait for the index to go green.

Parameters
string$indexName
int$timeout
Returns
bool true if the index is green false otherwise.

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