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

Adds redirects and incoming links to the documents. More...

+ Inheritance diagram for CirrusSearch\BuildDocument\RedirectsAndIncomingLinks:
+ Collaboration diagram for CirrusSearch\BuildDocument\RedirectsAndIncomingLinks:

Public Member Functions

 __construct (Connection $conn, BacklinkCacheFactory $backlinkCacheFactory, TitleFormatter $titleFormatter)
 
 finishInitializeBatch ()
 Called after a batch of pages have been passed to self::initialize.Allows implementations to batch calls to external services necessary for collecting page properties. Implementations must update the Document instances previously provided.The builder will be disposed of after finishing a batch.
 
 finalize (Document $doc, Title $title, RevisionRecord $revision)
 Finalize document building before sending to cluster.Called on every write attempt for every cluster to perform any final document building. Intended for bulk loading of content from wiki databases that would only serve to bloat the job queue.
Parameters
Document$doc
Title$title
RevisionRecord$revision
Exceptions
BuildDocumentException

 
- 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.
 
- Public Member Functions inherited from CirrusSearch\BuildDocument\PagePropertyBuilder
 initialize (Document $doc, WikiPage $page, RevisionRecord $revision)
 Perform initial building of a page document.
 

Protected Member Functions

 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

- 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 Attributes inherited from CirrusSearch\ElasticsearchIntermediary
 $connection
 
 $user
 
 $currentRequestLog = null
 
- Static Protected Attributes inherited from CirrusSearch\ElasticsearchIntermediary
static $requestLogger
 

Detailed Description

Adds redirects and incoming links to the documents.

These are done together because one needs the other.

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\BuildDocument\RedirectsAndIncomingLinks::__construct ( Connection $conn,
BacklinkCacheFactory $backlinkCacheFactory,
TitleFormatter $titleFormatter )
Parameters
Connection$conn
BacklinkCacheFactory$backlinkCacheFactory
TitleFormatter$titleFormatter

Member Function Documentation

◆ finalize()

CirrusSearch\BuildDocument\RedirectsAndIncomingLinks::finalize ( Document $doc,
Title $title,
RevisionRecord $revision )

Finalize document building before sending to cluster.Called on every write attempt for every cluster to perform any final document building. Intended for bulk loading of content from wiki databases that would only serve to bloat the job queue.

Parameters
Document$doc
Title$title
RevisionRecord$revision
Exceptions
BuildDocumentException

Implements CirrusSearch\BuildDocument\PagePropertyBuilder.

◆ finishInitializeBatch()

CirrusSearch\BuildDocument\RedirectsAndIncomingLinks::finishInitializeBatch ( )

Called after a batch of pages have been passed to self::initialize.Allows implementations to batch calls to external services necessary for collecting page properties. Implementations must update the Document instances previously provided.The builder will be disposed of after finishing a batch.

Implements CirrusSearch\BuildDocument\PagePropertyBuilder.

◆ newLog()

CirrusSearch\BuildDocument\RedirectsAndIncomingLinks::newLog ( $description,
$queryType,
array $extra = [] )
protected
Parameters
string$description
string$queryType
array$extra
Returns
SearchRequestLog

Reimplemented from CirrusSearch\ElasticsearchIntermediary.


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