CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\BuildDocument\PagePropertyBuilder Interface Reference

Interface for building subsets of the document stored in elasticsearch to represent individual wiki pages. More...

+ Inheritance diagram for CirrusSearch\BuildDocument\PagePropertyBuilder:

Public Member Functions

 initialize (Document $doc, WikiPage $page)
 Perform initial building of a page document.
 
 finishInitializeBatch ()
 Called after a batch of pages have been passed to self::initialize.
 
 finalize (Document $doc, Title $title)
 Finalize document building before sending to cluster.
 

Detailed Description

Interface for building subsets of the document stored in elasticsearch to represent individual wiki pages.

Member Function Documentation

◆ finalize()

CirrusSearch\BuildDocument\PagePropertyBuilder::finalize ( Document $doc,
Title $title )

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
Exceptions
BuildDocumentException

Implemented in CirrusSearch\BuildDocument\DefaultPageProperties, CirrusSearch\BuildDocument\ParserOutputPageProperties, and CirrusSearch\BuildDocument\RedirectsAndIncomingLinks.

◆ finishInitializeBatch()

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

Implemented in CirrusSearch\BuildDocument\DefaultPageProperties, CirrusSearch\BuildDocument\ParserOutputPageProperties, and CirrusSearch\BuildDocument\RedirectsAndIncomingLinks.

◆ initialize()

CirrusSearch\BuildDocument\PagePropertyBuilder::initialize ( Document $doc,
WikiPage $page )

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

Implemented in CirrusSearch\BuildDocument\DefaultPageProperties, and CirrusSearch\BuildDocument\ParserOutputPageProperties.


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