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

Tracks whether a Title is known on other indexes. More...

+ Inheritance diagram for CirrusSearch\OtherIndexesUpdater:
+ Collaboration diagram for CirrusSearch\OtherIndexesUpdater:

Public Member Functions

 __construct (Connection $readConnection, $writeToClusterName, $localSite)
 
- Public Member Functions inherited from CirrusSearch\Updater
 __construct (Connection $readConnection, $writeToClusterName=null)
 
 updateFromTitle ( $title)
 Update a single page.
 
 traceRedirects ( $title)
 Trace redirects from the title to the destination.
 
 updatePages ( $pages, $flags)
 This updates pages in elasticsearch.
 
 updateWeightedTags (ProperPageIdentity $page, string $tagField, string $tagPrefix, $tagNames=null, $tagWeights=null)
 
 resetWeightedTags (ProperPageIdentity $page, string $tagField, string $tagPrefix)
 
 deletePages ( $titles, $docIds, $indexSuffix=null, array $writeJobParams=[])
 Delete pages from the elasticsearch index.
 
 archivePages ( $archived)
 Add documents to archive index.
 
 updateLinkedArticles ( $titles)
 Update the search index for newly linked or unlinked articles.
 
- Public Member Functions inherited from CirrusSearch\ElasticsearchIntermediary
 start (RequestLog $log)
 Mark the start of a request to Elasticsearch.
 
 success ( $result=null, Connection $connection=null)
 Log a successful request and return the provided result in a good Status.
 
 successViaCache (RequestLog $log)
 Log a successful request when the response comes from a cache outside elasticsearch.
 
 failure (ExceptionInterface $exception=null, Connection $connection=null)
 Log a failure and return an appropriate status.
 
 getSearchMetrics ()
 Get the search metrics we have.
 

Static Public Member Functions

static buildOtherIndexesUpdater (SearchConfig $config, $cluster, $localSite)
 
static getExternalIndexes (SearchConfig $config, Title $title, $cluster=null)
 Get the external index identifiers for title.
 
static getExtraIndexesForNamespaces (SearchConfig $config, array $namespaces)
 Get any extra indexes to query, if any, based on namespaces.
 
- Static Public Member Functions inherited from CirrusSearch\Updater
static build (SearchConfig $config, $cluster)
 
- Static Public Member Functions inherited from CirrusSearch\ElasticsearchIntermediary
static setResultPages (array $matches)
 This is set externally because we don't have complete control, from the SearchEngine interface, of what is actually sent to the user.
 
static getQueryTypesUsed ()
 Report the types of queries that were issued within the current request.
 
static hasQueryLogs ()
 
static appendLastLogPayload ( $key, $value)
 
static isMSearchResultSetOK (MultiResultSet $multiResultSet)
 check validity of the multisearch response
 

Protected Member Functions

 runUpdates (Title $title, array $updates)
 
- Protected Member Functions inherited from CirrusSearch\Updater
 pushElasticaWriteJobs (array $items, $factory, int $batchSize=10)
 
 newLog ( $description, $queryType, array $extra=[])
 
- Protected Member Functions inherited from CirrusSearch\ElasticsearchIntermediary
 __construct (Connection $connection, UserIdentity $user=null, $slowSeconds=null, $extraBackendLatency=0)
 
 startNewLog ( $description, $queryType, array $extra=[])
 
 getTimeout ( $searchType='default')
 
 getClientTimeout ( $searchType='default')
 
 appendMetrics (SearchMetricsProvider $provider)
 
 runMSearch (Search $search, RequestLog $log, Connection $connection=null, callable $resultsTransformer=null)
 

Additional Inherited Members

- Protected Attributes inherited from CirrusSearch\Updater
 $writeToClusterName
 
- Protected Attributes inherited from CirrusSearch\ElasticsearchIntermediary
 $connection
 
 $user
 
 $currentRequestLog = null
 
- Static Protected Attributes inherited from CirrusSearch\ElasticsearchIntermediary
static $requestLogger
 

Detailed Description

Tracks whether a Title is known on other indexes.

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\OtherIndexesUpdater::__construct ( Connection $readConnection,
$writeToClusterName,
$localSite )
Parameters
Connection$readConnection
string | null$writeToClusterName
string$localSite

Member Function Documentation

◆ buildOtherIndexesUpdater()

static CirrusSearch\OtherIndexesUpdater::buildOtherIndexesUpdater ( SearchConfig $config,
$cluster,
$localSite )
static
Parameters
SearchConfig$config
string | null$cluster
string$localSite
Returns
OtherIndexesUpdater

◆ getExternalIndexes()

static CirrusSearch\OtherIndexesUpdater::getExternalIndexes ( SearchConfig $config,
Title $title,
$cluster = null )
static

Get the external index identifiers for title.

Parameters
SearchConfig$config
Title$title
string | null$clustercluster (as in CirrusSearchWriteClusters) to filter on
Returns
ExternalIndex[] array of external indices.

◆ getExtraIndexesForNamespaces()

static CirrusSearch\OtherIndexesUpdater::getExtraIndexesForNamespaces ( SearchConfig $config,
array $namespaces )
static

Get any extra indexes to query, if any, based on namespaces.

Parameters
SearchConfig$config
int[]$namespacesAn array of namespace ids
Returns
ExternalIndex[] array of indexes

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