CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Query\ArticleTopicFeature Class Reference
+ Inheritance diagram for CirrusSearch\Query\ArticleTopicFeature:
+ Collaboration diagram for CirrusSearch\Query\ArticleTopicFeature:

Public Member Functions

 parseValue ( $key, $value, $quotedValue, $valueDelimiter, $suffix, WarningCollector $warningCollector)
 @inheritDoc @phan-return array{topics:string[],tag_prefix:string}
 
- Public Member Functions inherited from CirrusSearch\Query\SimpleKeywordFeature
 getKeywordPrefixes ()
 
 allowEmptyValue ()
 Whether this keyword allows empty value.
 
 hasValue ()
 Whether this keyword can have a value.
 
 greedy ()
 Whether this keyword is greedy consuming the rest of the string.
 
 queryHeader ()
 Whether this keyword can appear only at the beginning of the query (excluding spaces)
 
 getFeatureName ( $key, $valueDelimiter)
 Determine the name of the feature being set in SearchContext::addSyntaxUsed Defaults to $key.
 
 getValueDelimiters ()
 List of value delimiters supported (must be an array of single byte char)
 
 getCrossSearchStrategy (KeywordFeatureNode $node)
 
 expand (KeywordFeatureNode $node, SearchConfig $config, WarningCollector $warningCollector)
 
 doApplyExtended (SearchContext $context, $key, $value, $quotedValue, $negated, $delimiter, $suffix)
 Fully featured apply method which delegates to doApply by default.
 
 apply (SearchContext $context, $term)
 

Static Public Member Functions

static getTopicScores (array $rawTopicData)
 Helper method for turning raw ORES score data (as stored in the Cirrus document) into search terms, for analytics/debugging.
 

Public Attributes

const ARTICLE_TOPIC_TAG_PREFIX = 'classification.ores.articletopic'
 
const DRAFT_TOPIC_TAG_PREFIX = 'classification.ores.drafttopic'
 
const TERMS_TO_LABELS
 

Protected Member Functions

 getKeywords ()
 @inheritDoc
 
 doApply (SearchContext $context, $key, $value, $quotedValue, $negated)
 @inheritDoc
 

Member Function Documentation

◆ doApply()

CirrusSearch\Query\ArticleTopicFeature::doApply ( SearchContext $context,
$key,
$value,
$quotedValue,
$negated )
protected

@inheritDoc

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ getKeywords()

CirrusSearch\Query\ArticleTopicFeature::getKeywords ( )
protected

@inheritDoc

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ getTopicScores()

static CirrusSearch\Query\ArticleTopicFeature::getTopicScores ( array $rawTopicData)
static

Helper method for turning raw ORES score data (as stored in the Cirrus document) into search terms, for analytics/debugging.

Parameters
array$rawTopicDataThe unprefixed content of the document's weighted_tags field
Returns
array corresponding search term => ORES score (rounded to three decimals)

◆ parseValue()

CirrusSearch\Query\ArticleTopicFeature::parseValue ( $key,
$value,
$quotedValue,
$valueDelimiter,
$suffix,
WarningCollector $warningCollector )

@inheritDoc @phan-return array{topics:string[],tag_prefix:string}

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.


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