Releases: meilisearch/meilisearch-php
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
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 ! 🎉
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.
actions
field 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
NOT
filter keyword does not have an implicitlyEXIST
operator 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
$options
toIndexes#allRaw
method (#360) @Jared87 - Add
faceting
andpagination
settings (#362) @tgalopin co-authored by @eelcol (#361)getFaceting
,updateFaceting
,resetFaceting
getPagination
,updatePagination
,resetPagination
- Fix bad typehint on
IndexesResults
constructor (#357) @norkunas - Use the correct notation for getting documents (#358) @brunoocasali
Thanks again to @Jared87, @brunoocasali, @eelcol, @norkunas and @tgalopin! 🎉
v0.24.0 🐘
This version makes this package only compatible with Meilisearch v0.28.0 🎉
Check out the changelog of Meilisearch v0.28.0 for more information on the changes.
💥 Breaking changes
rawSearch
(and other raw*
functions) are a direct connection between your PHP application and Meilisearch, you may find changes that are not present in this section.
MeiliSearch\Client->getDumpStatus
method was removed. (#336) @brunoocasaliMeiliSearch\Client->getIndexes
method now return a object typeIndexesResults
. (#341), (#345) @brunoocasaliMeiliSearch\Client->generateTenantToken
now require aString apiKeyUid
which is theuid
of theKey
instance used to sign the token. (#343) @brunoocasaliMeiliSearch\Client->createDump
now responds withTask
object. (#336, #337) @brunoocasaliMeiliSearch\Client->getKeys
method now return a object typeKeysResults
. (#343), (#338) @brunoocasaliMeiliSearch\Client->updateKey
now can just update adescription
and/orname
, if there are other key/value will be silently ignored. (#343), (#338) @brunoocasaliMeiliSearch\Client->getTasks
method now return a object typeTasksResults
. (#337), (#346) @brunoocasaliMeiliSearch\Index->getTasks
method now return a object typeTasksResults
. (#337), (#346) @brunoocasaliMeiliSearch\Index->search
facetsDistribution
is nowfacets
(#332) @curquizaMeiliSearch\Index->search
matches
is nowshowMatchesPosition
(#332) @curquizaMeiliSearch\Index->getDocuments
method now return a object typeDocumentsResults
.MeiliSearch\Index->getDocuments
method now accepts a object as a parameter andoffset
,limit
,attributesToRetrieve
were not longer accepted.exhaustiveNbHits
,facetsDistribution
,exhaustiveFacetsCount
were removed fromSearchResult
. (#332) @curquiza
🚀 Enhancements
MeiliSearch\Client->getIndexes
accepts a objectIndexesQuery
to filter and paginate the results.MeiliSearch\Client->getKeys
accepts a objectKeysQuery
to filter and paginate the results. (#343), (#338) @brunoocasaliMeiliSearch\Client->getKey
accepts both aKey#uid
orKey#key
value. (#343), (#338) @brunoocasaliMeiliSearch\Client->getTasks
accepts a objectTasksQuery
to filter and paginate the results. (#337), (#346) @brunoocasaliMeiliSearch\Index->getTasks
accepts a objectTasksQuery
to filter and paginate the results. (#337), (#346) @brunoocasaliMeiliSearch\Client->createKey
can specify auid
(optionally) to create a newKey
. (#343), (#338) @brunoocasaliMeiliSearch\Index->getDocument
accepts afields
list to compact the remap the response. (#340), (#344) @brunoocasaliMeiliSearch\Index->getDocuments
accepts a objectDocumentsQuery
to filter and paginate the results. (#340), (#344) @brunoocasaliKey
has now aname
anduid
string fields. (#343), (#338) @brunoocasaliestimatedTotalHits
,facetDistribution
were added toSearchResult
(#332) @curquizanbHits
is still defined and will contain the same value asestimatedTotalHits
.
- Sending a invalid
uid
orapiKey
will raiseInvalidApiKeyException
. (#343) @brunoocasali
Thanks again to @brunoocasali, @curquiza! 🎉
v0.23.3 🐘
🚀 Enhancements
- Improve Docker configuration in the package (#328) @brunoocasali
🐛 Bug Fixes
Thanks again to @Nextra, @brunoocasali ! 🎉
v0.23.2 🐘
This version makes this package compatible with Meilisearch v0.27.0🎉
Check out the changelog of Meilisearch v0.27.0 for more information about the changes.
🚀 Enhancements
- Add new methods for the new typo tolerance settings #316 @alallema
index.getTypoTolerance()
index.updateTypoTolerance(params)
index.resetTypoTolerance()
- Ensure nested field support #317 @alallema
- Add new search parameters highlightPreTag, highlightPostTag and cropMarker #318 @alallema
🐛 Bug Fixes
v0.23.1 🐘
v0.23.0 🐘
This version makes this package compatible with MeiliSearch v0.25 up to v0.26.0
🎉 Check out the changelog of MeiliSearch v0.26.0 for more information about the
⚠️ Breaking changes
- Make settings and synonyms be classes so they can be serialized properly (#281) @jonatanrdsantos
- Changes the Keys Class (#298) @alallema
🚀 Enhancements
- Added new method
generateTenantToken()
as a result of the addition of the multi-tenant functionality.
This method creates a JWT tenant token that will allow the user to have multi-tenant indexes and thus restrict access to documents based on the end-user making the search request. (#297) @alallema
Thanks again to @TeddyBear06, @alallema, @jonatanrdsantos! 🎉