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

Use PATCH not PUT for updating objects #36

Open
asgeo1 opened this issue Sep 28, 2023 · 5 comments
Open

Use PATCH not PUT for updating objects #36

asgeo1 opened this issue Sep 28, 2023 · 5 comments

Comments

@asgeo1
Copy link

asgeo1 commented Sep 28, 2023

Hello!

I want to use skip property in Weaviate, so some properties on my schema are not part of the generated vector.

I then want to be able to update a skip'd property, and it should not regenerate the vector, because that was the only property I updated, and it is not part of the vector.

It doesn't work currently. This is because weaviate-ruby is sending PUT rather than PATCH. I.e. it's replacing the entire object, which results in it regenerating the vector anyway, even if I'm only wanting to update a single, skipped property.

Suggest you have separate update and replace methods, which trigger PATCH and PUT respectively.

I forked the repo, and made this change myself, and it seems to work OK for me.

@andreibondarev
Copy link
Collaborator

@asgeo1 Would you be open to issuing a PR for this change please?

@obie
Copy link
Contributor

obie commented Nov 18, 2023

Any progress on this? Just ran into the same issue. @andreibondarev maybe you can pull the changes from Adam's fork?

@andreibondarev
Copy link
Collaborator

@obie I didn't see @asgeo1's fork. Is there one?

@obie
Copy link
Contributor

obie commented Nov 18, 2023 via email

@asgeo1
Copy link
Author

asgeo1 commented Nov 18, 2023

Hello, sorry I hadn't gotten back to looking at this issue. My fork is here: https://github.com/bluefrogsoftware/weaviate-ruby, I sent a PR if you want to look at my changes. If it doesn't pass CI, I'll take a look at the specs tomorrow.

The change I made is a breaking change though, since is changes how the existing update method works. Not sure if you're OK with that?

I think there was also some issue with replacing existing properties on a class, but I haven't resolved that one yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants