Skip to content

Releases: meilisearch/meilisearch-php

v1.2.0 🐘

05 Jun 11:48
e48fc6c

Choose a tag to compare

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.
⚠️ If you want to adopt new features of this release, update the Meilisearch server to the according version.

🚀 Enhancements

  • The method deleteDocuments() now supports a different behavior. This method could take an array containing a filter key with the filter value, which will filter and delete the documents. #509 @brunoocasali

    ⚠️ You must configure the attributes you want to filter using the Index\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-php v2

  • Add the ability to setFilter in the DocumentsQuery. When a query with a filter is sent to getDocuments(DocumentsQuery $query) it will filter the documents similar to the search method. See the docs on how to use filters. #510 @brunoocasali

    ⚠️ You must configure the attributes you want to filter using the Index\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

03 Apr 10:18
950d587

Choose a tag to compare

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, and updateDocumentsCsvInBatches. This argument allows you to customize the separator character in your csv file. (#480) @brunoocasali
  • Add a new getter, the facetStats on SearchResult (#487) @brunoocasali.
  • Add $client->multiSearch() method to execute multiple search requests simultaneously with different configurations. (#481) @brunoocasali
    • Introduce SearchQuery builder class to build the search requests used in the multiSearch.
      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']),
      ]);
    ⚠️ The SearchQuery was not meant to be used if the regular $index->search() requests (yet).

v1.0.0 🐘

06 Feb 13:31
11f12a2

Choose a tag to compare

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/Indexes date attributes $createdAt and $updatedAt are DateTime now instead of string. (#457) @brunoocasali
    • Removed getCreatedAtString and getUpdatedAtString functions.
  • Add canceledBy/setCanceledBy in TasksQuery (#454) @brunoocasali
  • Remove next attribute and setNext from TasksQuery. (#454) @brunoocasali
  • Remove next attribute and setNext from DeleteTasksQuery. (#454) @brunoocasali
  • Remove next, canceledBy attributes and setNext, setCanceledBy from CancelTasksQuery. (#454) @brunoocasali
  • Remove deleteAllIndexes, since they don't really delete all the indexes but only the first page. (#454) @brunoocasali
  • Remove getAllRawIndexes function. (#454) @brunoocasali
  • Rename getAllIndexes to getIndexes. (#454) @brunoocasali
  • Move all traits to src/Endpoints/Delegates. (#455) @brunoocasali
    • Meilisearch\Delegates\HandlesIndex to Meilisearch\Endpoints\Delegates\HandlesIndex
    • Meilisearch\Delegates\HandlesSystem to Meilisearch\Endpoints\Delegates\HandlesSystem
    • Meilisearch\Delegates\TasksQueryTrait to Meilisearch\Endpoints\Delegates\TasksQueryTrait

Enhancements

Thanks again to @brunoocasali and @norkunas! 🎉

v0.27.0 🐘

10 Jan 19:37
e95db9e

Choose a tag to compare

⚠️ This release has nothing new, and it is just a tag to mark the previous release 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

⚠️ If you handle ::class directly, a change is required, as pointed out #431 (comment)

Thanks again to @brunoocasali and @mmachatschek! 🎉

[DEPRECATED] v0.26.1 🐘

16 Dec 17:15
05db1b2

Choose a tag to compare

🚀 Enhancements

⚠️ If you handle ::class directly, a change is required, as pointed out #431 (comment)

Thanks again to @brunoocasali and @mmachatschek! 🎉

v0.26.0 🐘

28 Nov 15:04
ecbe0f6

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

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

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

Choose a tag to compare

🚀 Enhancements

Thanks again to @brunoocasali! 🎉

v0.24.1 🐘

09 Aug 13:52
43a5d1e

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