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

Public Member Functions

 __construct (EventSerializer $eventSerializer, PageEntitySerializer $pageEntitySerializer, string $stream=self::STREAM)
 
 getStream ()
 
 toArray (WikiPage $wikiPage, array $weightedTags, ?bool $revBased=null, ?string $dt=null)
 
 toSetEvent (WikiPage $wikiPage, array $set, ?bool $revBased=null, ?string $dt=null)
 
 toClearEvent (WikiPage $wikiPage, array $clear, ?bool $revBased=null, ?string $dt=null)
 

Public Attributes

const SCHEMA = '/development/cirrussearch/page_weighted_tags_change/1.0.0'
 
const STREAM = 'mediawiki.cirrussearch.page_weighted_tags_change.rc0'
 

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\EventBusWeightedTagSerializer::__construct ( EventSerializer $eventSerializer,
PageEntitySerializer $pageEntitySerializer,
string $stream = self::STREAM )
Parameters
EventSerializer$eventSerializer
PageEntitySerializer$pageEntitySerializer
string$stream

Member Function Documentation

◆ getStream()

CirrusSearch\EventBusWeightedTagSerializer::getStream ( )
Returns
string

◆ toArray()

CirrusSearch\EventBusWeightedTagSerializer::toArray ( WikiPage $wikiPage,
array $weightedTags,
?bool $revBased = null,
?string $dt = null )
Parameters
WikiPage$wikiPagepage to tag
array$weightedTagsweighted_tags payload, see schema
bool | null$revBasedrev_based flag
string | null$dtevent timestamp
Returns
array encoded event
See also
self::SCHEMA

◆ toClearEvent()

CirrusSearch\EventBusWeightedTagSerializer::toClearEvent ( WikiPage $wikiPage,
array $clear,
?bool $revBased = null,
?string $dt = null )
Parameters
WikiPage$wikiPage
string[]$clearprefixes to be cleared
bool | null$revBasedrev_based flag
string | null$dtevent timestamp
Returns
array

◆ toSetEvent()

CirrusSearch\EventBusWeightedTagSerializer::toSetEvent ( WikiPage $wikiPage,
array $set,
?bool $revBased = null,
?string $dt = null )
Parameters
WikiPage$wikiPage
array[]$setprefix => [ [ 'tag' => string ] | [ 'tag' => string, 'score' => int ] ] map
bool | null$revBasedrev_based flag
string | null$dtevent timestamp
Returns
array

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