Skip to content

Releases: meilisearch/meilisearch-php

v0.26.0 🐘

28 Nov 15:04
ecbe0f6
Compare
Choose a tag to compare

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 by Task.uid.
    • Added setCanceledBy(array<int>) filter to match by Task.canceledBy
    • Added setBeforeEnqueuedAt(\DateTime) filter to match by Task.beforeEnqueuedAt
    • Added setAfterEnqueuedAt(\DateTime) filter to match by Task.AfterEnqueuedAt
    • Added setBeforeStartedAt(\DateTime) filter to match by Task.beforeStartedAt
    • Added setAfterStartedAt(\DateTime) filter to match by Task.AfterStartedAt
    • Added setBeforeFinishedAt(\DateTime) filter to match by Task.beforeFinishedAt
    • Added setAfterFinishedAt(\DateTime) filter to match by Task.AfterFinishedAt
    • ⚠️⚠️ Renamed setUid(array) to setIndexUids(array) filter to match by Task.indexUid
    • ⚠️⚠️ Renamed setStatus(array) to setStatuses(array<string>) filter to match by Task.status

Thanks again to @brunoocasali ! 🎉

v0.25.1 🐘

26 Nov 14:45
29dffba
Compare
Choose a tag to compare

📝 Documentation

🚀 Enhancements

🐛 Bug Fixes

💅 Misc

  • Add uuids to index names for randomization (#388) @bofalke

Thanks again to @94noni, @AntonioLeutsch, @Braunson, @LeSuisse, @bofalke, @brunoocasali, @dependabot, @dependabot[bot], @girijakar, @jonatanrdsantos, @karlomikus, and @yhoungdev! 🎉

v0.25.0 🐘

03 Oct 14:25
95148ea
Compare
Choose a tag to compare

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 to indexes.create, indexes.get,indexes.delete, indexes.delete, and indexes.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.

v0.24.2 🐘

16 Aug 16:37
7f7b350
Compare
Choose a tag to compare

🚀 Enhancements

Thanks again to @brunoocasali! 🎉

v0.24.1 🐘

09 Aug 13:52
43a5d1e
Compare
Choose a tag to compare

🚀 Enhancements

  • Pass $options to Indexes#allRaw method (#360) @Jared87
  • Add faceting and pagination 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 🐘

11 Jul 15:59
072d430
Compare
Choose a tag to compare

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

⚠️ Small disclaimer: The 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) @brunoocasali
  • MeiliSearch\Client->getIndexes method now return a object type IndexesResults. (#341), (#345) @brunoocasali
  • MeiliSearch\Client->generateTenantToken now require a String apiKeyUid which is the uid of the Key instance used to sign the token. (#343) @brunoocasali
  • MeiliSearch\Client->createDump now responds with Task object. (#336, #337) @brunoocasali
  • MeiliSearch\Client->getKeys method now return a object type KeysResults. (#343), (#338) @brunoocasali
  • MeiliSearch\Client->updateKey now can just update a description and/or name, if there are other key/value will be silently ignored. (#343), (#338) @brunoocasali
  • MeiliSearch\Client->getTasks method now return a object type TasksResults. (#337), (#346) @brunoocasali
  • MeiliSearch\Index->getTasks method now return a object type TasksResults. (#337), (#346) @brunoocasali
  • MeiliSearch\Index->search facetsDistribution is now facets (#332) @curquiza
  • MeiliSearch\Index->search matches is now showMatchesPosition (#332) @curquiza
  • MeiliSearch\Index->getDocuments method now return a object type DocumentsResults.
  • MeiliSearch\Index->getDocuments method now accepts a object as a parameter and offset, limit, attributesToRetrieve were not longer accepted.
  • exhaustiveNbHits, facetsDistribution, exhaustiveFacetsCount were removed from SearchResult. (#332) @curquiza

🚀 Enhancements

  • MeiliSearch\Client->getIndexes accepts a object IndexesQuery to filter and paginate the results.
  • MeiliSearch\Client->getKeys accepts a object KeysQuery to filter and paginate the results. (#343), (#338) @brunoocasali
  • MeiliSearch\Client->getKey accepts both a Key#uid or Key#key value. (#343), (#338) @brunoocasali
  • MeiliSearch\Client->getTasks accepts a object TasksQuery to filter and paginate the results. (#337), (#346) @brunoocasali
  • MeiliSearch\Index->getTasks accepts a object TasksQuery to filter and paginate the results. (#337), (#346) @brunoocasali
  • MeiliSearch\Client->createKey can specify a uid (optionally) to create a new Key. (#343), (#338) @brunoocasali
  • MeiliSearch\Index->getDocument accepts a fields list to compact the remap the response. (#340), (#344) @brunoocasali
  • MeiliSearch\Index->getDocuments accepts a object DocumentsQuery to filter and paginate the results. (#340), (#344) @brunoocasali
  • Key has now a name and uid string fields. (#343), (#338) @brunoocasali
  • estimatedTotalHits, facetDistribution were added to SearchResult (#332) @curquiza
    • nbHits is still defined and will contain the same value as estimatedTotalHits.
  • Sending a invalid uid or apiKey will raise InvalidApiKeyException. (#343) @brunoocasali

Thanks again to @brunoocasali, @curquiza! 🎉

v0.23.3 🐘

21 Jun 16:15
e993256
Compare
Choose a tag to compare

🚀 Enhancements

🐛 Bug Fixes

  • Fix errors assigning bool to DateTime properties in Keys (#326) @Nextra

Thanks again to @Nextra, @brunoocasali ! 🎉

v0.23.2 🐘

09 May 11:35
e6048db
Compare
Choose a tag to compare

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 🐘

17 Mar 09:32
dcd198b
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Fix authorization header when no api key is provide (#305) @alallema

Thanks again to @alallema ! 🎉

v0.23.0 🐘

14 Mar 15:24
8a38493
Compare
Choose a tag to compare

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 about the flag and dump new behavior. (#292)

⚠️ Breaking changes

🚀 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! 🎉