v0.26.0 π
meili-bot
released this
28 Nov 15:04
·
519 commits
to refs/heads/main
since this release
This version makes this package compatible with Meilisearch v0.30.0 π
Check out the changelog of Meilisearch v0.30.0 for more information on the changes.
π Enhancements
Add support to finite pagination (#418) @brunoocasali
Now you can call:
$client.search('batman', [ 'page' => 1, 'hitsPerPage' => 10 ])
$client.search('batman', [ 'hitsPerPage' => 10 ])
$client.search('batman', [ 'page' => 4 ])
results = $client.search('batman', [ 'page' => 4 ])
And get a limited pagination with a fixed number of total hits in the results object results['totalHits']
.
You can still use the offset/limit
by calling $client.search('batman', [ 'limit' => 4, 'offset' => 10 ])
SearchResult#hitsCount
can still retrieve the total hits value.
Add cancelTasks
method (#420) @brunoocasali
Allow users to cancel a processing or an enqueued task by using `cancelTasks(CancelTasksQuery $query)`
// CancelTasksQuery methods:
setNext(int $next)
setTypes(array $types)
setStatuses(array $statuses)
setIndexUids(array $indexUids)
setUids(array $uids)
setCanceledBy(array $canceledBy)
setBeforeEnqueuedAt(\DateTime $date)
setAfterEnqueuedAt(\DateTime $date)
setBeforeStartedAt(\DateTime $date)
setAfterStartedAt(\DateTime $date)
setBeforeFinishedAt(\DateTime $date)
setAfterFinishedAt(\DateTime $date)
Add swapIndexes
method (#422) @brunoocasali
Add a new method in the Client client->swapIndexes(array $indexes) to swap indexes. The array should follow this structure: [['indexA', 'indexB'], ['indexC', 'indexD'], ...]
Add deleteTasks
method (#423) @brunoocasali
Allow users to delete processed, failed, and canceled tasks.
A new method deleteTasks(DeleteTasksQuery $query)
// DeleteTasksQuery methods:
setNext(int $next)
setTypes(array $types)
setStatuses(array $statuses)
setIndexUids(array $indexUids)
setUids(array $uids)
setCanceledBy(array $canceledBy)
setBeforeEnqueuedAt(\DateTime $date)
setAfterEnqueuedAt(\DateTime $date)
setBeforeStartedAt(\DateTime $date)
setAfterStartedAt(\DateTime $date)
setBeforeFinishedAt(\DateTime $date)
setAfterFinishedAt(\DateTime $date)
β οΈ Breaking Changes
- Add and Update filters to the
tasks
resource. (#419) @brunoocasali- Added
setUids(array<int>)
filter to match byTask.uid
. - Added
setCanceledBy(array<int>)
filter to match byTask.canceledBy
- Added
setBeforeEnqueuedAt(\DateTime)
filter to match byTask.beforeEnqueuedAt
- Added
setAfterEnqueuedAt(\DateTime)
filter to match byTask.AfterEnqueuedAt
- Added
setBeforeStartedAt(\DateTime)
filter to match byTask.beforeStartedAt
- Added
setAfterStartedAt(\DateTime)
filter to match byTask.AfterStartedAt
- Added
setBeforeFinishedAt(\DateTime)
filter to match byTask.beforeFinishedAt
- Added
setAfterFinishedAt(\DateTime)
filter to match byTask.AfterFinishedAt
β οΈ β οΈ RenamedsetUid(array)
tosetIndexUids(array)
filter to match byTask.indexUid
β οΈ β οΈ RenamedsetStatus(array)
tosetStatuses(array<string>)
filter to match byTask.status
- Added
Thanks again to @brunoocasali ! π