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

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"
 

Detailed Description

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.

Member Function Documentation

◆ buildFromParsedQuery()

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.

Parameters
ParsedNode$nodethe node holding the location of the query string we want to blank
string$replacementoptional replacement string to use

{}

{}

{}

{}

{}

{}

{}

{}


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