CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Builds an Elastica query backed by an elasticsearch QueryString query Has many warts and edge cases that are hardly desirable. More...
Public Member Functions | |
__construct (SearchConfig $config, array $features, array $settings=[]) | |
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 $searchContext, array $fields, AbstractQuery $nearMatchQuery, $queryString) | |
Build the primary query used for full text search. | |
getMultiTermRewriteMethod () | |
the rewrite method to use for multi term queries | |
buildHighlightQuery (SearchContext $context, array $fields, $queryText, $slop) | |
Builds the highlight query. | |
buildPhraseRescoreQuery (SearchContext $context, array $fields, $queryText, $slop) | |
Builds the phrase rescore query. | |
isPhraseRescoreNeeded (SearchContext $searchContext) | |
Determines if a phrase rescore is needed. | |
maybeWrapWithTokenCountRouter ( $queryText, \Elastica\Query\AbstractQuery $query) | |
Protected Attributes | |
$config | |
Builds an Elastica query backed by an elasticsearch QueryString query Has many warts and edge cases that are hardly desirable.
CirrusSearch\Query\FullTextQueryStringQueryBuilder::__construct | ( | SearchConfig | $config, |
array | $features, | ||
array | $settings = [] ) |
SearchConfig | $config | |
KeywordFeature[] | $features | |
array[] | $settings | currently ignored |
Reimplemented in CirrusSearch\Query\FullTextSimpleMatchQueryBuilder.
CirrusSearch\Query\FullTextQueryStringQueryBuilder::build | ( | SearchContext | $searchContext, |
$term ) |
Search articles with provided term.
SearchContext | $searchContext | |
string | $term | term to search searches that might be better? |
Implements CirrusSearch\Query\FullTextQueryBuilder.
CirrusSearch\Query\FullTextQueryStringQueryBuilder::buildDegraded | ( | SearchContext | $searchContext | ) |
Attempt to build a degraded query from the query already built into $context.
Must be called after self::build().
SearchContext | $searchContext |
Implements CirrusSearch\Query\FullTextQueryBuilder.
|
protected |
Builds the highlight query.
SearchContext | $context | |
string[] | $fields | |
string | $queryText | |
int | $slop |
Reimplemented in CirrusSearch\Query\FullTextSimpleMatchQueryBuilder.
|
protected |
Builds the phrase rescore query.
SearchContext | $context | |
string[] | $fields | |
string | $queryText | |
int | $slop |
Reimplemented in CirrusSearch\Query\FullTextSimpleMatchQueryBuilder.
|
protected |
Build the primary query used for full text search.
This will be a QueryString query, and optionally a MultiMatch if a $nearMatchQuery is provided.
SearchContext | $searchContext | |
string[] | $fields | |
AbstractQuery | $nearMatchQuery | |
string | $queryString |
Reimplemented in CirrusSearch\Query\FullTextSimpleMatchQueryBuilder.
|
protected |
the rewrite method to use for multi term queries
Reimplemented in CirrusSearch\Query\FullTextSimpleMatchQueryBuilder.
|
protected |
Determines if a phrase rescore is needed.
SearchContext | $searchContext |
|
protected |
string | $queryText | |
AbstractQuery | $query |