Meilisearch PHP | Documentation

ExportQuery
in package
implements JsonSerializable

FinalYes

Request body of `POST /export`, which sends documents and settings to another Meilisearch instance.

Tags
phpstan-import-type

RawExportIndexOptions from ExportIndexOptions

phpstan-type

RawExportQuery array{ url: non-empty-string, apiKey?: non-empty-string, payloadSize?: non-empty-string|positive-int, indexes?: array<non-empty-string, RawExportIndexOptions> }

Table of Contents

Interfaces

JsonSerializable

Properties

$apiKey  : non-empty-string|null
$indexes  : array<non-empty-string, ExportIndexOptions>|null
$payloadSize  : non-empty-string|positive-int|null
$url  : string

Methods

__construct()  : mixed
jsonSerialize()  : object
setApiKey()  : $this
setIndexes()  : $this
setPayloadSize()  : $this
toArray()  : RawExportQuery

Properties

$apiKey

private non-empty-string|null $apiKey = null

$payloadSize

private non-empty-string|positive-int|null $payloadSize = null

Methods

__construct()

public __construct(non-empty-string $url) : mixed
Parameters
$url : non-empty-string

URL of the destination instance

jsonSerialize()

public jsonSerialize() : object
Return values
object

setApiKey()

public setApiKey(non-empty-string|null $apiKey) : $this
Parameters
$apiKey : non-empty-string|null

API key of the destination instance, with permission to add documents and update settings

Return values
$this

setIndexes()

public setIndexes(array<non-empty-string, ExportIndexOptions>|null $indexes) : $this
Parameters
$indexes : array<non-empty-string, ExportIndexOptions>|null

options keyed by index uid pattern, e.g. movies* or *; null exports all indexes

Return values
$this

setPayloadSize()

public setPayloadSize(non-empty-string|positive-int|null $payloadSize) : $this
Parameters
$payloadSize : non-empty-string|positive-int|null

maximum size of each payload sent to the destination, in bytes or as a human-readable string such as "50 MiB"

Return values
$this

toArray()

public toArray() : RawExportQuery
Return values
RawExportQuery
On this page

Search results