CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Forms and caches connection to Elasticsearch as well as client objects that contain connection information like \Elastica\Index and \Elastica\Type. More...
Public Member Functions | |
__construct (SearchConfig $config, $cluster=null) | |
__sleep () | |
getClusterName () | |
getSettings () | |
getServerList () | |
getMaxConnectionAttempts () | |
How many times can we attempt to connect per host? | |
getArchiveIndex ( $name) | |
Fetch the Elastica Index for archive. | |
getAllIndexSuffixes ( $documentType=self::PAGE_DOC_TYPE) | |
Get all index types we support, content, general, plus custom ones. | |
extractIndexSuffix ( $name) | |
getIndexSuffixForNamespace ( $namespace) | |
Get the index suffix for a given namespace. | |
pickIndexTypeForNamespaces (?array $namespaces=null) | |
pickIndexSuffixForNamespaces (?array $namespaces=null) | |
getAllIndexSuffixesForNamespaces ( $namespaces=null) | |
destroyClient () | |
getConfig () | |
Static Public Member Functions | |
static | getPool (SearchConfig $config, $cluster=null) |
static | clearPool () |
Pool state must be cleared when forking. | |
static | getClusterConnections (array $clusters, SearchConfig $config) |
Protected Attributes | |
$config | |
$cluster | |
Forms and caches connection to Elasticsearch as well as client objects that contain connection information like \Elastica\Index and \Elastica\Type.
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\Connection::__construct | ( | SearchConfig | $config, |
$cluster = null ) |
SearchConfig | $config | |
string | null | $cluster | Name of cluster to use, or null for the default cluster. |
CirrusSearch\Connection::__sleep | ( | ) |
|
static |
Pool state must be cleared when forking.
Also useful in tests.
CirrusSearch\Connection::extractIndexSuffix | ( | $name | ) |
string | $name |
Exception |
CirrusSearch\Connection::getAllIndexSuffixes | ( | $documentType = self::PAGE_DOC_TYPE | ) |
Get all index types we support, content, general, plus custom ones.
string | null | $documentType | the document type name the index must support to be returned can be self::PAGE_DOC_TYPE for content and general indices but also self::ARCHIVE_DOC_TYPE for the archive index. Defaults to Connection::PAGE_DOC_TYPE. set to null to return all known index types (only suited for maintenance tasks, not for read/write operations). |
CirrusSearch\Connection::getAllIndexSuffixesForNamespaces | ( | $namespaces = null | ) |
int[] | null | $namespaces | List of namespaces to check |
CirrusSearch\Connection::getArchiveIndex | ( | $name | ) |
Fetch the Elastica Index for archive.
mixed | $name | basename of index |
|
static |
string[] | $clusters | array of cluster names |
SearchConfig | $config | the search config |
CirrusSearch\Connection::getClusterName | ( | ) |
CirrusSearch\Connection::getConfig | ( | ) |
CirrusSearch\Connection::getIndexSuffixForNamespace | ( | $namespace | ) |
Get the index suffix for a given namespace.
int | $namespace | A namespace id |
CirrusSearch\Connection::getMaxConnectionAttempts | ( | ) |
How many times can we attempt to connect per host?
|
static |
SearchConfig | $config | |
string | null | $cluster |
CirrusSearch\Connection::getServerList | ( | ) |
CirrusSearch\Connection::getSettings | ( | ) |
CirrusSearch\Connection::pickIndexSuffixForNamespaces | ( | ?array | $namespaces = null | ) |
int[] | null | $namespaces | List of namespaces to check |
CirrusSearch\Connection::pickIndexTypeForNamespaces | ( | ?array | $namespaces = null | ) |
int[] | null | $namespaces | List of namespaces to check |