CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Parser\AST\PhraseQueryNode Class Reference

A phrase. More...

+ Inheritance diagram for CirrusSearch\Parser\AST\PhraseQueryNode:
+ Collaboration diagram for CirrusSearch\Parser\AST\PhraseQueryNode:

Public Member Functions

 __construct ( $start, $end, $phrase, $slop, $stem)
 
 toArray ()
 
 getPhrase ()
 The phrase.
 
 getSlop ()
 number of words allowed between phrase words (-1 to use wiki defaults)
 
 isStem ()
 Should this phrase be applied on stem fields.
 
 isUnbalanced ()
 True if this phrase was created by detecting unbalanced quotes in the query.
 
 accept (Visitor $visitor)
 
- Public Member Functions inherited from CirrusSearch\Parser\AST\ParsedNode
 __construct ( $startOffset, $endOffset)
 
 getStartOffset ()
 
 getEndOffset ()
 

Static Public Member Functions

static unbalanced ( $start, $end, $phrase)
 

Additional Inherited Members

- Protected Member Functions inherited from CirrusSearch\Parser\AST\ParsedNode
 baseParams ()
 

Detailed Description

A phrase.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Parser\AST\PhraseQueryNode::__construct ( $start,
$end,
$phrase,
$slop,
$stem )
Parameters
int$start
int$end
string$phrase
int$slopthe edit distance (in words) allowed between words defined in this query, set to -1 if a specific slop is not specified in the syntax.
bool$stemtrue if the syntax specifies that this phrase should be applied to stem fields

Member Function Documentation

◆ accept()

CirrusSearch\Parser\AST\PhraseQueryNode::accept ( Visitor $visitor)
Parameters
Visitor$visitor

Implements CirrusSearch\Parser\AST\Visitor\Visitable.

◆ getPhrase()

CirrusSearch\Parser\AST\PhraseQueryNode::getPhrase ( )

The phrase.

Returns
string

◆ getSlop()

CirrusSearch\Parser\AST\PhraseQueryNode::getSlop ( )

number of words allowed between phrase words (-1 to use wiki defaults)

Returns
int

◆ isStem()

CirrusSearch\Parser\AST\PhraseQueryNode::isStem ( )

Should this phrase be applied on stem fields.

Returns
bool

◆ isUnbalanced()

CirrusSearch\Parser\AST\PhraseQueryNode::isUnbalanced ( )

True if this phrase was created by detecting unbalanced quotes in the query.

Returns
bool

◆ toArray()

CirrusSearch\Parser\AST\PhraseQueryNode::toArray ( )
Returns
array

Reimplemented from CirrusSearch\Parser\AST\ParsedNode.

◆ unbalanced()

static CirrusSearch\Parser\AST\PhraseQueryNode::unbalanced ( $start,
$end,
$phrase )
static
Parameters
int$start
int$end
string$phrase
Returns
PhraseQueryNode

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