Meilisearch PHP | Documentation

DocumentsQuery
in package

Table of Contents

Properties

$fields  : array<int, string>|null
$filter  : array<int, non-empty-string|array<int, non-empty-string>>|null
$limit  : int|null
$offset  : int|null
$retrieveVectors  : bool|null

Methods

hasFilter()  : bool
Checks if the $filter attribute has been set.
setFields()  : $this
setFilter()  : $this
Sets the filter for the DocumentsQuery.
setLimit()  : $this
setOffset()  : $this
setRetrieveVectors()  : $this
toArray()  : array<string|int, mixed>
getFields()  : array<string|int, mixed>|string|null
Prepares fields for request Fix for 1.2 document/fetch.

Properties

$filter

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

Methods

hasFilter()

Checks if the $filter attribute has been set.

public hasFilter() : bool
Return values
bool

true when filter contains at least a non-empty array

setFields()

public setFields(array<int, string> $fields) : $this
Parameters
$fields : array<int, string>
Return values
$this

setFilter()

Sets the filter for the DocumentsQuery.

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>>

a filter expression written as an array of strings

Return values
$this

setLimit()

public setLimit(int $limit) : $this
Parameters
$limit : int
Return values
$this

setOffset()

public setOffset(int $offset) : $this
Parameters
$offset : int
Return values
$this

setRetrieveVectors()

public setRetrieveVectors(bool|null $retrieveVectors) : $this
Parameters
$retrieveVectors : bool|null

boolean value to show _vector details

Return values
$this

toArray()

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results