MatchPhraseSearchQuery
in package
implements
JsonSerializable, SearchQuery
A FTS query that matches several given terms (a "phrase"), applying further processing like analyzers to them.
Interfaces, Classes, Traits and Enums
- JsonSerializable
- SearchQuery
- Common interface for all classes, which could be used as a body of SearchQuery
Table of Contents
- $analyzer : string|null
- $boost : float|null
- $field : string|null
- $matchPhrase : string
- __construct() : mixed
- analyzer() : MatchPhraseSearchQuery
- Sets the analytics for this query.
- boost() : MatchPhraseSearchQuery
- Sets the boost for this query.
- build() : MatchPhraseSearchQuery
- Static helper to keep code more readable
- field() : MatchPhraseSearchQuery
- Sets the field for this query.
Properties
$analyzer
private
string|null
$analyzer
= null
$boost
private
float|null
$boost
= null
$field
private
string|null
$field
= null
$matchPhrase
private
string
$matchPhrase
Methods
__construct()
public
__construct(string $phrase) : mixed
Parameters
- $phrase : string
Return values
mixed —analyzer()
Sets the analytics for this query.
public
analyzer(string $analyzer) : MatchPhraseSearchQuery
Parameters
- $analyzer : string
-
the analyzer to use for this query.
Tags
Return values
MatchPhraseSearchQuery —boost()
Sets the boost for this query.
public
boost(float $boost) : MatchPhraseSearchQuery
Parameters
- $boost : float
-
the boost value to use.
Tags
Return values
MatchPhraseSearchQuery —build()
Static helper to keep code more readable
public
static build(string $phrase) : MatchPhraseSearchQuery
Parameters
- $phrase : string
Tags
Return values
MatchPhraseSearchQuery —field()
Sets the field for this query.
public
field(string $field) : MatchPhraseSearchQuery
Parameters
- $field : string
-
the field to use.