CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Detects phrase queries: "simple phrase" : use the plain fields "simple phrase"~ : use the stem fields "simple phrase"~2 : force the slop to be 2 "simple phrase"~2~ : force the slop to be 2 and use the stem fields. More...
Public Member Functions | |
__construct (Escaper $escaper) | |
parse ( $query, $start, $end) | |
Public Attributes | |
const | PHRASE_START = '/\G(?<negate>-|!)?"/' |
Start of a phrase. | |
Detects phrase queries: "simple phrase" : use the plain fields "simple phrase"~ : use the stem fields "simple phrase"~2 : force the slop to be 2 "simple phrase"~2~ : force the slop to be 2 and use the stem fields.
The phrase can be negated using a ! or - Quotes can be escaped using \
Supports phrase prefix as well: "simple phras*" iff slop and stem are not provided otherwise we send a simple phrase node
CirrusSearch\Parser\QueryStringRegex\PhraseQueryParser::parse | ( | $query, | |
$start, | |||
$end ) |
string | $query | |
int | $start | |
int | $end |