CirrusSearch
Elasticsearch-powered search for MediaWiki
|
ParseQuery visitor that attempts to extract a form that resembles to the near match query. More...
Public Member Functions | |
__construct (array $profile) | |
buildFromParsedQuery (ParsedQuery $query) | |
buildFromQueryString (string $query) | |
Static Public Member Functions | |
static | defaultFromSearchConfig (SearchConfig $config) |
static | defaultFromWeight (float $weight) |
Public Attributes | |
const | ALL_NEAR_MATCH = "all_near_match" |
const | ALL_NEAR_MATCH_ACCENT_FOLDED = self::ALL_NEAR_MATCH . ".asciifolding" |
ParseQuery visitor that attempts to extract a form that resembles to the near match query.
This implementation tries to mimic the strategy of the old query parser that works by removing keywords. It might make sense in the future to reconsider this approach and see if there are better strategies to apply with the help of the ParsedQuery.
CirrusSearch\Query\Builder\NearMatchFieldQueryBuilder::buildFromParsedQuery | ( | ParsedQuery | $query | ) |
Blank the portion of the search query located at the same location as the $node. A custom replacement can be passed but must not have a length greater than this location.
ParsedNode | $node | the node holding the location of the query string we want to blank |
string | $replacement | optional replacement string to use |
{}
{}
{}
{}
{}
{}
{}
{}