TermSearchQuery
in package
implements
JsonSerializable, SearchQuery
A facet that gives the number of occurrences of the most recurring terms in all hits.
Interfaces, Classes, Traits and Enums
- JsonSerializable
- SearchQuery
- Common interface for all classes, which could be used as a body of SearchQuery
Table of Contents
- $boost : float|null
- $field : string|null
- $fuzziness : int|null
- $prefixLength : int|null
- $term : string
- __construct() : mixed
- boost() : TermSearchQuery
- Sets the boost for this query.
- build() : TermSearchQuery
- Static helper to keep code more readable
- field() : TermSearchQuery
- Sets the field for this query.
- fuzziness() : TermSearchQuery
- Set the fuzziness for this query.
- prefixLength() : TermSearchQuery
- Sets the prefix length for this query.
Properties
$boost
private
float|null
$boost
= null
$field
private
string|null
$field
= null
$fuzziness
private
int|null
$fuzziness
= null
$prefixLength
private
int|null
$prefixLength
= null
$term
private
string
$term
Methods
__construct()
public
__construct(string $term) : mixed
Parameters
- $term : string
Return values
mixed —boost()
Sets the boost for this query.
public
boost(float $boost) : TermSearchQuery
Parameters
- $boost : float
-
the boost value to use.
Tags
Return values
TermSearchQuery —build()
Static helper to keep code more readable
public
static build(string $term) : TermSearchQuery
Parameters
- $term : string
Tags
Return values
TermSearchQuery —field()
Sets the field for this query.
public
field(string $field) : TermSearchQuery
Parameters
- $field : string
-
the field to use.
Tags
Return values
TermSearchQuery —fuzziness()
Set the fuzziness for this query.
public
fuzziness(int $fuzziness) : TermSearchQuery
Parameters
- $fuzziness : int
-
the fuzziness to use.
Tags
Return values
TermSearchQuery —prefixLength()
Sets the prefix length for this query.
public
prefixLength(int $prefixLength) : TermSearchQuery
Parameters
- $prefixLength : int
-
the prefix length to use.