Meilisearch PHP | Documentation

FacetSearchQuery
in package

Table of Contents

Properties

$attributesToSearchOn  : array<int, non-empty-string>|null
$facetName  : non-empty-string|null
$facetQuery  : non-empty-string|null
$filter  : array<int, non-empty-string|array<int, non-empty-string>>|null
$matchingStrategy  : "last"|"all"|"frequency"|null
$q  : string|null

Methods

setAttributesToSearchOn()  : $this
setFacetName()  : $this
setFacetQuery()  : $this
setFilter()  : $this
setMatchingStrategy()  : $this
setQuery()  : $this
toArray()  : array{facetName?: non-empty-string, facetQuery?: non-empty-string, q?: string, filter?: list>, matchingStrategy?: "last"|"all"|"frequency"|null, attributesToSearchOn?: non-empty-list}

Properties

$attributesToSearchOn

private array<int, non-empty-string>|null $attributesToSearchOn = null

$filter

private array<int, non-empty-string|array<int, non-empty-string>>|null $filter = null

$matchingStrategy

private "last"|"all"|"frequency"|null $matchingStrategy = null

Methods

setAttributesToSearchOn()

public setAttributesToSearchOn(array<int, non-empty-string> $attributesToSearchOn) : $this
Parameters
$attributesToSearchOn : array<int, non-empty-string>
Return values
$this

setFacetName()

public setFacetName(string $facetName) : $this
Parameters
$facetName : string
Return values
$this

setFacetQuery()

public setFacetQuery(string $facetQuery) : $this
Parameters
$facetQuery : string
Return values
$this

setFilter()

public setFilter(array<int, non-empty-string|array<int, non-empty-string>> $filter) : $this
Parameters
$filter : array<int, non-empty-string|array<int, non-empty-string>>
Return values
$this

setMatchingStrategy()

public setMatchingStrategy("last"|"all"|"frequency" $matchingStrategy) : $this
Parameters
$matchingStrategy : "last"|"all"|"frequency"
Return values
$this

setQuery()

public setQuery(string $q) : $this
Parameters
$q : string
Return values
$this

toArray()

public toArray() : array{facetName?: non-empty-string, facetQuery?: non-empty-string, q?: string, filter?: list>, matchingStrategy?: "last"|"all"|"frequency"|null, attributesToSearchOn?: non-empty-list}
Return values
array{facetName?: non-empty-string, facetQuery?: non-empty-string, q?: string, filter?: list>, matchingStrategy?: "last"|"all"|"frequency"|null, attributesToSearchOn?: non-empty-list}

        
On this page

Search results