CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Interface for building subsets of the document stored in elasticsearch to represent individual wiki pages. More...
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. | |
Interface for building subsets of the document stored in elasticsearch to represent individual wiki pages.
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.
Document | $doc | |
Title | $title |
BuildDocumentException |
Implemented in CirrusSearch\BuildDocument\DefaultPageProperties, CirrusSearch\BuildDocument\ParserOutputPageProperties, and CirrusSearch\BuildDocument\RedirectsAndIncomingLinks.
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.
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.
Document | $doc | The document to be populated |
WikiPage | $page | The page to scope operation to |
Implemented in CirrusSearch\BuildDocument\DefaultPageProperties, and CirrusSearch\BuildDocument\ParserOutputPageProperties.