Meilisearch PHP | Documentation

Indexes extends Endpoint
in package

FinalYes

Table of Contents

Constants

PATH  : mixed = '/indexes'

Properties

$http  : Http

Methods

__construct()  : mixed
all()  : IndexesResults
allRaw()  : array{results: list, offset: int, limit: int, total: int}
create()  : Task
renameIndex()  : Task
Rename an index instead of swapping it.
swapIndexes()  : Task
Each entry is either a pair of index uids to swap, or an array with the pair under `indexes` and an optional `rename` flag (since Meilisearch v1.18.0) that renames the first index to the second uid instead of swapping them.

Constants

PATH

protected mixed PATH = '/indexes'

Properties

Methods

allRaw()

public allRaw([array{offset?: int, limit?: int} $options = [] ]) : array{results: list, offset: int, limit: int, total: int}
Parameters
$options : array{offset?: int, limit?: int} = []
Return values
array{results: list, offset: int, limit: int, total: int}

create()

public create(string $uid[, array{primaryKey?: string|null} $options = [] ]) : Task
Parameters
$uid : string
$options : array{primaryKey?: string|null} = []
Tags
throws
Exception
Return values
Task

swapIndexes()

Each entry is either a pair of index uids to swap, or an array with the pair under `indexes` and an optional `rename` flag (since Meilisearch v1.18.0) that renames the first index to the second uid instead of swapping them.

public swapIndexes(array<int, array{non-empty-string, non-empty-string}|array{indexes: array{non-empty-string, non-empty-string}, rename?: bool}> $indexes) : Task
Parameters
$indexes : array<int, array{non-empty-string, non-empty-string}|array{indexes: array{non-empty-string, non-empty-string}, rename?: bool}>
Tags
see
https://www.meilisearch.com/docs/reference/api/indexes/swap-indexes
Return values
Task
On this page

Search results