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

Handles non-regexp version of insource: keyword. More...

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

Public Member Functions

 __construct (SearchConfig $config)
 
 buildNonRegexHLFields (KeywordFeatureNode $node, QueryBuildingContext $buildingContext)
 @inheritDoc
 
- Public Member Functions inherited from CirrusSearch\Query\BaseRegexFeature
 __construct (SearchConfig $config, array $fields)
 
 getValueDelimiters ()
 
 parseValue ( $key, $value, $quotedValue, $valueDelimiter, $suffix, WarningCollector $warningCollector)
 
 getFeatureName ( $key, $valueDelimiter)
 
 getCrossSearchStrategy (KeywordFeatureNode $node)
 
 doApplyExtended (SearchContext $context, $key, $value, $quotedValue, $negated, $delimiter, $suffix)
 
 getFilterQuery (KeywordFeatureNode $node, QueryBuildingContext $context)
 @inheritDoc
 
 buildHighlightFields (KeywordFeatureNode $node, QueryBuildingContext $context)
 @inheritDoc
 
- 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)
 
 expand (KeywordFeatureNode $node, SearchConfig $config, WarningCollector $warningCollector)
 
 apply (SearchContext $context, $term)
 

Protected Member Functions

 getKeywords ()
 
 doApply (SearchContext $context, $key, $value, $quotedValue, $negated)
 
 getNonRegexFilterQuery (KeywordFeatureNode $node, QueryBuildingContext $context)
 

Detailed Description

Handles non-regexp version of insource: keyword.

The value (including possible quotes) is used as part of a QueryString query while allows some bit of advanced syntax. Because quotes are included, if present, multi-word queries containing AND or OR do not work.

Examples: insource:Foo insource:Foo* insource:"gold rush"

Regex support: insource:/abc?/

Things that don't work: insource:"foo*" insource:"foo OR bar"

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ buildNonRegexHLFields()

CirrusSearch\Query\InSourceFeature::buildNonRegexHLFields ( KeywordFeatureNode $node,
QueryBuildingContext $buildingContext )

@inheritDoc

Reimplemented from CirrusSearch\Query\BaseRegexFeature.

◆ doApply()

CirrusSearch\Query\InSourceFeature::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.

◆ getKeywords()

CirrusSearch\Query\InSourceFeature::getKeywords ( )
protected
Returns
string[]

Reimplemented from CirrusSearch\Query\SimpleKeywordFeature.

◆ getNonRegexFilterQuery()

CirrusSearch\Query\InSourceFeature::getNonRegexFilterQuery ( KeywordFeatureNode $node,
QueryBuildingContext $context )
protected
Parameters
KeywordFeatureNode$node
QueryBuildingContext$context
Returns
AbstractQuery|null

Reimplemented from CirrusSearch\Query\BaseRegexFeature.


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