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

Simple Match query builder, currently based on FullTextQueryStringQueryBuilder to reuse its parsing logic. More...

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

Public Member Functions

 __construct (SearchConfig $config, array $feature, array $settings)
 
- Public Member Functions inherited from CirrusSearch\Query\FullTextQueryStringQueryBuilder
 build (SearchContext $searchContext, $term)
 Search articles with provided term.
 
 buildDegraded (SearchContext $searchContext)
 Attempt to build a degraded query from the query already built into $context.
 

Protected Member Functions

 buildSearchTextQuery (SearchContext $context, array $fields, AbstractQuery $nearMatchQuery, $queryString)
 Build the primary query used for full text search.
 
 buildHighlightQuery (SearchContext $context, array $fields, $queryText, $slop)
 Builds the highlight query.
 
 buildPhraseRescoreQuery (SearchContext $context, array $fields, $queryText, $slop)
 Builds the phrase rescore query.
 
 getMultiTermRewriteMethod ()
 @inheritDoc
 
- Protected Member Functions inherited from CirrusSearch\Query\FullTextQueryStringQueryBuilder
 isPhraseRescoreNeeded (SearchContext $searchContext)
 Determines if a phrase rescore is needed.
 
 maybeWrapWithTokenCountRouter ( $queryText, \Elastica\Query\AbstractQuery $query)
 

Additional Inherited Members

- Protected Attributes inherited from CirrusSearch\Query\FullTextQueryStringQueryBuilder
 $config
 

Detailed Description

Simple Match query builder, currently based on FullTextQueryStringQueryBuilder to reuse its parsing logic.

It will only support queries that do not use the lucene QueryString syntax and fallbacks to FullTextQueryStringQueryBuilder in such cases. It generates only simple match/multi_match queries. It supports merging multiple clauses into a dismax query with 'in_dismax'.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Query\FullTextSimpleMatchQueryBuilder::__construct ( SearchConfig $config,
array $features,
array $settings )
Parameters
SearchConfig$config
KeywordFeature[]$features
array[]$settingscurrently ignored

Reimplemented from CirrusSearch\Query\FullTextQueryStringQueryBuilder.

Member Function Documentation

◆ buildHighlightQuery()

CirrusSearch\Query\FullTextSimpleMatchQueryBuilder::buildHighlightQuery ( SearchContext $context,
array $fields,
$queryText,
$slop )
protected

Builds the highlight query.

Parameters
SearchContext$context
string[]$fields
string$queryText
int$slop
Returns
\Elastica\Query\AbstractQuery

Reimplemented from CirrusSearch\Query\FullTextQueryStringQueryBuilder.

◆ buildPhraseRescoreQuery()

CirrusSearch\Query\FullTextSimpleMatchQueryBuilder::buildPhraseRescoreQuery ( SearchContext $context,
array $fields,
$queryText,
$slop )
protected

Builds the phrase rescore query.

Parameters
SearchContext$context
string[]$fields
string$queryText
int$slop
Returns
\Elastica\Query\AbstractQuery

Reimplemented from CirrusSearch\Query\FullTextQueryStringQueryBuilder.

◆ buildSearchTextQuery()

CirrusSearch\Query\FullTextSimpleMatchQueryBuilder::buildSearchTextQuery ( SearchContext $context,
array $fields,
AbstractQuery $nearMatchQuery,
$queryString )
protected

Build the primary query used for full text search.

If query_string syntax is not used the experimental query is built. We fallback to parent implementation otherwise.

Parameters
SearchContext$context
string[]$fields
AbstractQuery$nearMatchQuery
string$queryString
Returns
\Elastica\Query\AbstractQuery

Reimplemented from CirrusSearch\Query\FullTextQueryStringQueryBuilder.

◆ getMultiTermRewriteMethod()

CirrusSearch\Query\FullTextSimpleMatchQueryBuilder::getMultiTermRewriteMethod ( )
protected

@inheritDoc

Reimplemented from CirrusSearch\Query\FullTextQueryStringQueryBuilder.


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