Skip to content

[v1.18.0] Add queryVector to search responses and support index renaming #703

@Strift

Description

@Strift

Context

We want to update the SDK to support Meilisearch 1.18 features.

Description

When search requests include the retrieveVectors parameters, the API responses will now include a queryVector field. We want to update the SDK methods to return this field accordingly.

Additionally, Meilisearch now supports renaming indexes. There are two ways to achieve this. The examples below both demonstrate how to rename indexA to indexB:

# Using index swapping
curl \
  -X POST 'MEILISEARCH_URL/swap-indexes' \
  -H 'Content-Type: application/json' \
  --data-binary '[
    {
      "indexes": [
        "indexA",
        "indexB"
      ],
      "rename": true
    },
  ]'

# Using index update
curl \
  -X PATCH 'MEILISEARCH_URL/indexes/indexA' \
  -H 'Content-Type: application/json' \
  --data-binary '{ "indexUid": "indexB" }'

Tasks

  • Update the search responses to include queryVector when necessary
  • Update the index update method to allow renaming
  • Update the index swapping method to allow renaming
  • Add new test cases to test the implementation
  • Add an example under the rename_an_index_1 YAML key in .code-samples.meilisearch.yaml. It should be the equivalent of this CURL example

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