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

Finds pages similar to another one. More...

+ Inheritance diagram for CirrusSearch\Query\MoreLikeFeature:
+ Collaboration diagram for CirrusSearch\Query\MoreLikeFeature:

Public Member Functions

 __construct (SearchConfig $config)
 
 greedy ()
 
 queryHeader ()
 morelike is only allowed at the beginning of the query
 
 getFeatureName ( $key, $valueDelimiter)
 
 getCrossSearchStrategy (KeywordFeatureNode $node)
 
 expand (KeywordFeatureNode $node, SearchConfig $config, WarningCollector $warningCollector)
 
 getConfig ()
 
- Public Member Functions inherited from CirrusSearch\Query\SimpleKeywordFeature
 getKeywordPrefixes ()
 
 allowEmptyValue ()
 Whether this keyword allows empty value.
 
 hasValue ()
 Whether this keyword can have a value.
 
 getValueDelimiters ()
 List of value delimiters supported (must be an array of single byte char)
 
 parseValue ( $key, $value, $quotedValue, $valueDelimiter, $suffix, WarningCollector $warningCollector)
 Parse the value of the keyword.
 
 doApplyExtended (SearchContext $context, $key, $value, $quotedValue, $negated, $delimiter, $suffix)
 Fully featured apply method which delegates to doApply by default.
 
 apply (SearchContext $context, $term)
 
- Public Member Functions inherited from CirrusSearch\Query\LegacyKeywordFeature
 doApplyExtended (SearchContext $context, $key, $value, $quotedValue, $negated, $delimiter, $suffix)
 Fully featured apply method which delegates to doApply by default.
 

Protected Member Functions

 getKeywords ()
 NOTE: will be removed once all implementations implement getKeywordStrings (transitional state to change the visibility of getKeywords())
 
 doApply (SearchContext $context, $key, $value, $quotedValue, $negated)
 

Detailed Description

Finds pages similar to another one.

Greedy keyword kept for BC purposes, MoreLikeThisFeature should be preferred.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Query\MoreLikeFeature::__construct ( SearchConfig $config)
Parameters
SearchConfig$config

Member Function Documentation

◆ doApply()

CirrusSearch\Query\MoreLikeFeature::doApply ( SearchContext $context,
$key,
$value,
$quotedValue,
$negated )
protected
Parameters
SearchContext$context
string$key
string$value
string$quotedValue
bool$negated
Returns
array

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ expand()

CirrusSearch\Query\MoreLikeFeature::expand ( KeywordFeatureNode $node,
SearchConfig $config,
WarningCollector $warningCollector )
Parameters
KeywordFeatureNode$node
SearchConfig$config
WarningCollector$warningCollector
Returns
array|Title[]

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ getConfig()

CirrusSearch\Query\MoreLikeFeature::getConfig ( )
Returns
SearchConfig

◆ getCrossSearchStrategy()

CirrusSearch\Query\MoreLikeFeature::getCrossSearchStrategy ( KeywordFeatureNode $node)
Parameters
KeywordFeatureNode$node
Returns
CrossSearchStrategy

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ getFeatureName()

CirrusSearch\Query\MoreLikeFeature::getFeatureName ( $key,
$valueDelimiter )
Parameters
string$key
string$valueDelimiter
Returns
string

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ getKeywords()

CirrusSearch\Query\MoreLikeFeature::getKeywords ( )
protected

NOTE: will be removed once all implementations implement getKeywordStrings (transitional state to change the visibility of getKeywords())

Returns
string[] The list of keywords this feature is supposed to match

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ greedy()

CirrusSearch\Query\MoreLikeFeature::greedy ( )
Returns
bool

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ queryHeader()

CirrusSearch\Query\MoreLikeFeature::queryHeader ( )

morelike is only allowed at the beginning of the query

Returns
bool

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.


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