Skip to content
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

Support for collection update #118

Closed
kishorenc opened this issue May 2, 2022 · 0 comments
Closed

Support for collection update #118

kishorenc opened this issue May 2, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@kishorenc
Copy link
Member

Is your feature request related to a problem? Please describe.

In the next version of Typesense (0.23) we're supporting in-place schema changes to collections through a PATCH /collections/:name end-point. We need to add this method to the client.

Describe the solution you'd like

Please see the examples I've created for the various clients (not all of them are implemented yet) here.

The Dart version looks like this:

final updateSchema = UpdateSchema(
  {
    Field('company_category', Type.string),
    Field('num_employees', drop: true)
  }
);
await client.collection('companies').update(updateSchema);

For now you can change only the fields (can't change the name or other properties like default_sorting_field etc. yet). So we need a UpdateSchema wrapper class that's a subset of the Schema class (only containing fields) with which we can call the .update().

cc @happy-san

@kishorenc kishorenc added the enhancement New feature or request label May 2, 2022
@happy-san happy-san self-assigned this May 6, 2022
@happy-san happy-san mentioned this issue May 15, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants