CirrusSearch
Elasticsearch-powered search for MediaWiki
|
A KeywordFeature that generates an elasticsearch query used as a filter. More...
Public Member Functions | |
getFilterQuery (KeywordFeatureNode $node, QueryBuildingContext $context) | |
Build a filter query using the information available in KeywordFeatureNode or in QueryBuildingContext::getKeywordExpandedData() This method will be called at the very end of the query generation process when building the query of the search request. | |
A KeywordFeature that generates an elasticsearch query used as a filter.
When a keyword implementation wants to filter a subset of docs matching a particular field/term it needs to implement this interface. This interface should only be implemented by KeywordFeature implementations.
CirrusSearch\Query\FilterQueryFeature::getFilterQuery | ( | KeywordFeatureNode | $node, |
QueryBuildingContext | $context ) |
Build a filter query using the information available in KeywordFeatureNode or in QueryBuildingContext::getKeywordExpandedData() This method will be called at the very end of the query generation process when building the query of the search request.
The implementor may return null in case the parsed data is inappropriate it may help the query generation code to optimize the search process by not sending a search request to the backend (e.g. when this keyword is part of a conjunction at the root)
KeywordFeatureNode | $node | the node corresponding to this keyword that was parsed |
QueryBuildingContext | $context |
Implemented in CirrusSearch\Query\BaseRegexFeature, CirrusSearch\Query\ContentModelFeature, CirrusSearch\Query\DeepcatFeature, CirrusSearch\Query\FileTypeFeature, CirrusSearch\Query\HasRecommendationFeature, CirrusSearch\Query\HasTemplateFeature, CirrusSearch\Query\InCategoryFeature, CirrusSearch\Query\IndexedNumericFieldFeature, CirrusSearch\Query\LanguageFeature, CirrusSearch\Query\LinksToFeature, CirrusSearch\Query\PageIdFeature, CirrusSearch\Query\PrefixFeature, CirrusSearch\Query\SubPageOfFeature, and CirrusSearch\Query\TextFieldFilterFeature.