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

Default properties attached to all page documents. More...

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

Public Member Functions

 __construct (IReadableDatabase $db)
 
 initialize (Document $doc, WikiPage $page, RevisionRecord $revision)
 Perform initial building of a page document.Called once per page when starting an update and is shared between all clusters written to. This doc may be written to the jobqueue multiple times and should not contain any large (in number of bytes) values.
Parameters
Document$docThe document to be populated
WikiPage$pageThe page to scope operation to
RevisionRecord$revisionThe page revision to use

 
 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

 

Detailed Description

Default properties attached to all page documents.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\BuildDocument\DefaultPageProperties::__construct ( IReadableDatabase $db)
Parameters
IReadableDatabase$dbWiki database to query additional page properties from.

Member Function Documentation

◆ finalize()

CirrusSearch\BuildDocument\DefaultPageProperties::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\DefaultPageProperties::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.

◆ initialize()

CirrusSearch\BuildDocument\DefaultPageProperties::initialize ( Document $doc,
WikiPage $page,
RevisionRecord $revision )

Perform initial building of a page document.Called once per page when starting an update and is shared between all clusters written to. This doc may be written to the jobqueue multiple times and should not contain any large (in number of bytes) values.

Parameters
Document$docThe document to be populated
WikiPage$pageThe page to scope operation to
RevisionRecord$revisionThe page revision to use

Parameters
Document$docThe document to be populated
WikiPage$pageThe page to scope operation to

Implements CirrusSearch\BuildDocument\PagePropertyBuilder.


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