Skip to content

Changes related to MeiliSearch v0.25.0 #157

@curquiza

Description

@curquiza

This issue gathers the changes related to the v0.25.0 of MeiliSearch that will impact the integrations

Release date: 10/01/2022


matches works with numerical value

Related to meilisearch/meilisearch#1883

This might only impact some tests.
The strongly typed SDKs should not be impacted in the code base since the return of matchesInfo is still exactly the same. It's just now activated for the numerical value.

Drop support for dump before v0.21.0 (not included)

Related to meilisearch/meilisearch#1972

Concerns only migration-script. This might be impactful for the user. Not sure we want to spend time creating a specific case for people using MeiliSearch v0.20.0 and before. However, we could put a warning in the README to not use the migration script if you are using MeiliSearch v0.20.0 and before. This warning should redirect to the dedicated page of the docs that will already describe how to process.

Create, update and delete an index are now asynchronous

meilisearch/meilisearch#1786

Related to meilisearch/meilisearch#1786

Strongly impacts SDKs.
From now, create_index, update_index and delete_index are asynchronous.

  • It means the return of these methods is not an Index object anymore but an update task!
    Adapt your SDKs accordingly, regarding the language and the current code base.
  • get_or_create should not call create_index to check if the index exists (it might be the case in some SDKs)
  • Don't forget to adapt the tests.

Redesign the update task API

Related to meilisearch/meilisearch#1780

Huge work here.
For deepest details and any hesitation, please refer to the spec: https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md

Here are the main points:

  • The update resource is renamed task. The names of existing API routes are also changed to reflect this change.
    -> All the code base should be renamed accordingly.
  • Tasks are now also accessible as an independent resource of an index. GET - /tasks; GET - /tasks/:taskUid
    -> New methods should be created
  • The task uid is not incremented by index anymore. The sequence is generated globally.
    -> can impact the tests
  • processed status is renamed into succeeded
    -> Can impact some tests and even your code-base, be careful
  • A task_not_found error is introduced.
    -> can impact the SDKs where the code errors are listed
  • The format of the task object is updated. Refer to the spec for the detail
    -> Can impacts the code base and the tests
  • 202 Accepted requests previously returning an updateId are now returning a summarized task object.
    -> Same
  • task object lists are now returned under a results array.
    -> Same

API keys and permissions management

Related to meilisearch/meilisearch#1867

Again, huge work here
For deepest details and any hesitation, please refer to the spec: meilisearch/specifications#85

  • The X-MEILI-API-KEY header is replaced by the Authorization: Bearer <apiKey> header
    -> impacts all the SDKs
  • New errors are introduced: missing_parameter, invalid_api_key_description, invalid_api_key_actions, invalid_api_key_indexes, invalid_api_key_expires_at, api_key_not_found.
    -> impacts the strongly typed SDKs that handle all the error codes.
  • GET /keys returns the list of the keys
    -> the return is not the same at all as before, check the spec for the details
  • POST/PATCH/DELETE /keys to create, update or delete a key
    -> new methods should be created!
    -> The PATCH method should be added.
    -> Check the spec for more details

🔥 Tests must be added 🔥

FYI

  • the master key is still named master key
  • MeiliSearch already handles the errors according to the right context. No need to complexity the error handler in your SDKs

⚠️ Be careful, this release can impact more repository than we can expect, not only the SDKs. Release the other repos (like docs-scraper) carefully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions