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

Limits the search to the local wiki. More...

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

Public Member Functions

 hasValue ()
 
 queryHeader ()
 
 getCrossSearchStrategy (KeywordFeatureNode $node)
 
- Public Member Functions inherited from CirrusSearch\Query\SimpleKeywordFeature
 getKeywordPrefixes ()
 
 allowEmptyValue ()
 Whether this keyword allows empty value.
 
 greedy ()
 Whether this keyword is greedy consuming the rest of the string.
 
 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)
 
 parseValue ( $key, $value, $quotedValue, $valueDelimiter, $suffix, WarningCollector $warningCollector)
 Parse the value of the keyword.
 
 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)
 
- 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 ()
 
 doApply (SearchContext $context, $key, $value, $quotedValue, $negated)
 Applies the detected keyword from the search term.
 

Detailed Description

Limits the search to the local wiki.

Primarily this excludes results from commons when searching the NS_FILE namespace. No value may be provided along with this keyword, it is a simple boolean flag.

Member Function Documentation

◆ doApply()

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

Applies the detected keyword from the search term.

May apply changes either to $context directly, or return a filter to be added.

Parameters
SearchContext$context
string$keyThe keyword
string$valueThe value attached to the keyword with quotes stripped and escaped quotes un-escaped.
string$quotedValueThe original value in the search string, including quotes if used
bool$negatedIs the search negated? Not used to generate the returned AbstractQuery, that will be negated as necessary. Used for any other building/context necessary.
Returns
array Two element array, first an AbstractQuery or null to apply to the query. Second a boolean indicating if the quotedValue should be kept in the search string.

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ getCrossSearchStrategy()

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

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ getKeywords()

CirrusSearch\Query\LocalFeature::getKeywords ( )
protected
Returns
string[] The list of keywords this feature is supposed to match

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ hasValue()

CirrusSearch\Query\LocalFeature::hasValue ( )
Returns
bool

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ queryHeader()

CirrusSearch\Query\LocalFeature::queryHeader ( )
Returns
bool

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.


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