Skip to content

primary key in the update index method should be optionnal #296

Closed
@bidoubiwa

Description

@bidoubiwa

Description

Currently the method to update an index requires a primary key as per the method definition:

pub async fn update(&self, primary_key: impl AsRef<str>) -> Result<(), Error>

As an example:

client.index("movies").update("movie_review_id"));

Expected behavior
In Meilisearch the update route accepts no primary Key field being defined, or one set to null. See spec.

Current behavior
The primaryKey is required. It should not and could introduce a big breaking change if a new parameter becomes updatable on the update index route. In which case the user is going to have to define a primary key even if they only want to update the other parameter(s).

Environment (please complete the following information):

  • Meilisearch version: v0.27.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersmaintenanceAnything related to maintenance (CI, tests, refactoring...)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions