Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bidoubiwa opened this issue Jun 6, 2022 · 1 comment
Closed

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

bidoubiwa opened this issue Jun 6, 2022 · 1 comment
Labels
good first issue Good for newcomers maintenance Anything related to maintenance (CI, tests, refactoring...)

Comments

@bidoubiwa
Copy link
Contributor

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
@bidoubiwa bidoubiwa added good first issue Good for newcomers maintenance Anything related to maintenance (CI, tests, refactoring...) labels Jun 6, 2022
@bidoubiwa
Copy link
Contributor Author

Fixed by #315

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers maintenance Anything related to maintenance (CI, tests, refactoring...)
Projects
None yet
Development

No branches or pull requests

1 participant