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
tasksresource. (#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 - ⚠️⚠️ Renamed
setUid(array)tosetIndexUids(array)filter to match byTask.indexUid - ⚠️⚠️ Renamed
setStatus(array)tosetStatuses(array<string>)filter to match byTask.status
- Added
Thanks again to @brunoocasali ! 🎉