Releases: meilisearch/meilisearch-php
v1.2.0 🐘
This version introduces features released on Meilisearch v1.2.0 🎉
Check out the changelog of Meilisearch v1.2.0 for more information on the changes.
🚀 Enhancements
-
The method
deleteDocuments()now supports a different behavior. This method could take anarraycontaining afilterkey with the filter value, which will filter and delete the documents. #509 @brunoocasali⚠️ You must configure the attributes you want to filter using theIndex\filterableAttributes().
⚠️ Remember to update your Meilisearch server to v1.2.0 or newer before adopting it.Still, even being supported, the ability to receive only a list of ids is deprecated, and it will be removed in
meilisearch-phpv2 -
Add the ability to
setFilterin theDocumentsQuery. When a query with afilteris sent togetDocuments(DocumentsQuery $query)it will filter the documents similar to thesearchmethod. See the docs on how to use filters. #510 @brunoocasali⚠️ You must configure the attributes you want to filter using theIndex\filterableAttributes().
⚠️ Remember to update your Meilisearch server to v1.2.0 or newer before adopting it.
Thanks again to @brunoocasali, @tacman, @norkunas! 🎉
v1.1.0
This version introduces features released on Meilisearch v1.1.0 🎉
Check out the changelog of Meilisearch v1.1.0 for more information on the changes.
If you want to adopt new features of this release, update the Meilisearch server to the according version.
🚀 Enhancements
- Add a new optional argument to
addDocumentsCsv,addDocumentsCsvInBatches, andupdateDocumentsCsvInBatches. This argument allows you to customize the separator character in yourcsvfile. (#480) @brunoocasali - Add a new getter, the
facetStatsonSearchResult(#487) @brunoocasali. - Add
$client->multiSearch()method to execute multiple search requests simultaneously with different configurations. (#481) @brunoocasali-
Introduce
SearchQuerybuilder class to build the search requests used in themultiSearch.
Usage example:$this->client->multiSearch([ (new SearchQuery())->setIndexUid('books') ->setQuery('princ') ->setSort(['author:desc']), (new SearchQuery())->setIndexUid('movies') ->setQuery('be') ->setHitsPerPage(4) ->setFilter(['duration-float > 3']), ]);
⚠️ TheSearchQuerywas not meant to be used if the regular$index->search()requests (yet). -
v1.0.0 🐘
This version makes this package compatible with Meilisearch v1.0.0 🎉
Check out the changelog of Meilisearch v1.0.0 for more information on the changes.
💥 Breaking Changes
Endpoints/Indexesdate attributes$createdAtand$updatedAtareDateTimenow instead ofstring. (#457) @brunoocasali- Removed
getCreatedAtStringandgetUpdatedAtStringfunctions.
- Removed
- Add
canceledBy/setCanceledByinTasksQuery(#454) @brunoocasali - Remove
nextattribute andsetNextfromTasksQuery. (#454) @brunoocasali - Remove
nextattribute andsetNextfromDeleteTasksQuery. (#454) @brunoocasali - Remove
next,canceledByattributes andsetNext,setCanceledByfromCancelTasksQuery. (#454) @brunoocasali - Remove
deleteAllIndexes, since they don't really delete all the indexes but only the first page. (#454) @brunoocasali - Remove
getAllRawIndexesfunction. (#454) @brunoocasali - Rename
getAllIndexestogetIndexes. (#454) @brunoocasali - Move all traits to
src/Endpoints/Delegates. (#455) @brunoocasaliMeilisearch\Delegates\HandlesIndextoMeilisearch\Endpoints\Delegates\HandlesIndexMeilisearch\Delegates\HandlesSystemtoMeilisearch\Endpoints\Delegates\HandlesSystemMeilisearch\Delegates\TasksQueryTraittoMeilisearch\Endpoints\Delegates\TasksQueryTrait
Enhancements
Thanks again to @brunoocasali and @norkunas! 🎉
v0.27.0 🐘
v0.26.1 as breaking, so v0.27.0.
You should be careful because every occurrence of MeiliSearch, even in the file names were changed to Meilisearch.
More details in the comments section here and here.
Original changelog from v0.26.1:
🚀 Enhancements
- Change casing of
MeiliSearchtoMeilisearch(#431) @mmachatschek
::class directly, a change is required, as pointed out #431 (comment)
Thanks again to @brunoocasali and @mmachatschek! 🎉
[DEPRECATED] v0.26.1 🐘
🚀 Enhancements
- Change casing of
MeiliSearchtoMeilisearch(#431) @mmachatschek
::class directly, a change is required, as pointed out #431 (comment)
Thanks again to @brunoocasali and @mmachatschek! 🎉
v0.26.0 🐘
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 ⚠️ ⚠️ RenamedsetUid(array)tosetIndexUids(array)filter to match byTask.indexUid⚠️ ⚠️ RenamedsetStatus(array)tosetStatuses(array<string>)filter to match byTask.status
- Added
Thanks again to @brunoocasali ! 🎉
v0.25.1 🐘
📝 Documentation
- Added the current app documentation to README (#396) @yhoungdev
- Update README.md (#400) @94noni
- Added two new code-sample requested (#407) @Braunson
- Add phpstan to contributing (#410) @jonatanrdsantos
🚀 Enhancements
- Allow to inject the StreamFactoryInterface explicitly (#387) @LeSuisse
- Make possible for static analysis tools to detect return type of
Indexes::search(#389) @LeSuisse - Enforce strong type property - related with #385 (#392) @jonatanrdsantos
- Add PHP hosted documentation (#393) @jonatanrdsantos
- Remove test path from phpDocumentor run (#394) @jonatanrdsantos
- Fix phpdoc block of IndexesResults constructor (#398) @jonatanrdsantos
- Implement methods for CSV and Ndjson batch adds (#399) @karlomikus
🐛 Bug Fixes
- This will fix docs in batches sending same chunk (#386) @AntonioLeutsch
- Bug Fix/PHP stan (#409) @brunoocasali
💅 Misc
Thanks again to @94noni, @AntonioLeutsch, @Braunson, @LeSuisse, @bofalke, @brunoocasali, @dependabot, @dependabot[bot], @girijakar, @jonatanrdsantos, @karlomikus, and @yhoungdev! 🎉
v0.25.0 🐘
This version makes this package compatible with Meilisearch v0.29.0 🎉
Check out the changelog of Meilisearch v0.29.0 for more information on the changes.
🚀 Enhancements
- Ensure support to the new search query parameter
matchingStrategy(#376) @brunoocasali - Ensure support to keys with wildcarded actions.
actionsfield during key creation now accepts wildcards on actions. For example,indexes.*provides rights toindexes.create,indexes.get,indexes.delete,indexes.delete, andindexes.update. (#377) @brunoocasali
⚠️ Breaking Changes
This breaking change may not affect you, but in any case, you should check your search queries if you want to keep the same behavior from v0.28.
- The
NOTfilter keyword does not have an implicitlyEXISToperator anymore. Check out for more information: meilisearch/meilisearch#2486
v0.24.2 🐘
🚀 Enhancements
- Add the ability to provide extra custom user agents (#369) @brunoocasali
Thanks again to @brunoocasali! 🎉
v0.24.1 🐘
🚀 Enhancements
- Pass
$optionstoIndexes#allRawmethod (#360) @Jared87 - Add
facetingandpaginationsettings (#362) @tgalopin co-authored by @eelcol (#361)getFaceting,updateFaceting,resetFacetinggetPagination,updatePagination,resetPagination
- Fix bad typehint on
IndexesResultsconstructor (#357) @norkunas - Use the correct notation for getting documents (#358) @brunoocasali
Thanks again to @Jared87, @brunoocasali, @eelcol, @norkunas and @tgalopin! 🎉