Skip to content

feat: support vectorset #3375

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

feat: support vectorset #3375

wants to merge 10 commits into from

Conversation

fukua95
Copy link
Contributor

@fukua95 fukua95 commented May 9, 2025

@ofekshenawa ofekshenawa linked an issue May 11, 2025 that may be closed by this pull request
@ndyakov
Copy link
Member

ndyakov commented May 14, 2025

Thank you @fukua95, will review as soon as possible.

@fukua95 fukua95 force-pushed the feat/vector-set branch from 1775700 to 51a44fb Compare May 15, 2025 13:17
Copy link
Member

@ndyakov ndyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left two comments, this is just a partial review.

@ndyakov
Copy link
Member

ndyakov commented May 23, 2025

@fukua95 we will have a discussion next week, overall I think the PR looks good, if the team agrees on the return types, I will merge this, thank you.

@fukua95
Copy link
Contributor Author

fukua95 commented May 23, 2025

@fukua95 we will have a discussion next week, overall I think the PR looks good, if the team agrees on the return types, I will merge this, thank you.

Thank you for your review.

If there is anything that needs to be updated (the return types or others), please feel free to let me know.

One more thing: The VSim command in Redis code (unstable) has the option Epsilon, by the doc in Redis.io don't have. I'll modify the code after you decide whether to keep this option.

@fukua95 fukua95 force-pushed the feat/vector-set branch from c728790 to 3c8b754 Compare May 28, 2025 02:55
@fukua95 fukua95 force-pushed the feat/vector-set branch 2 times, most recently from 91a5791 to 2a1d2d4 Compare May 28, 2025 11:57
@ndyakov
Copy link
Member

ndyakov commented May 28, 2025

@fukua95 we are still not set on the return types, but one thing I will suggest is to use something similar to

type Z struct {
for the responses with scores. It will make this more consistent with the rest of the library and in general I don't see the benefit of having a map here - I don't see a lot of usecases that will benefit from the constant time to access an element. WDYT?

@fukua95
Copy link
Contributor Author

fukua95 commented May 28, 2025

@fukua95 we are still not set on the return types, but one thing I will suggest is to use something similar to

type Z struct {

for the responses with scores. It will make this more consistent with the rest of the library and in general I don't see the benefit of having a map here - I don't see a lot of usecases that will benefit from the constant time to access an element. WDYT?

Using a struct is more user-friendly. I will update it soon.

@ndyakov
Copy link
Member

ndyakov commented Jun 2, 2025

Thank you @fukua95 , let me know if you need any help. You can also find me on Discord

@fukua95
Copy link
Contributor Author

fukua95 commented Jun 2, 2025

Thank you @fukua95 , let me know if you need any help. You can also find me on Discord

Apologies for the delay @ndyakov - these days mark a holiday in my country, and I'm currently traveling.
I'll update the code tonight.

Copy link
Member

@ndyakov ndyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fukua95 I added some suggestions, let me know if you would like to address them or if you like I can work on those. Thank you for the amazing work so far!

p.s. Don't worry about the delays, I am here to help you with merging this and if you don't have the bandwidth to continue the work on it I can continue.

@fukua95
Copy link
Contributor Author

fukua95 commented Jun 2, 2025

@ndyakov Thank you for the detailed review! I really appreciate your suggestions and I'll work on the updates tonight or tomorrow.

fukua95 added 2 commits June 2, 2025 23:26
Signed-off-by: fukua95 <fukua95@gmail.com>
* the type of vector attribute: string -> VectorAttributeMarshaller
* Add a new API VRemAttr
* mark the APIs are experimental

Signed-off-by: fukua95 <fukua95@gmail.com>
@fukua95 fukua95 force-pushed the feat/vector-set branch from 44bdb80 to 40c0ecf Compare June 2, 2025 15:41
Signed-off-by: fukua95 <fukua95@gmail.com>
@ndyakov
Copy link
Member

ndyakov commented Jun 3, 2025

@fukua95 just a heads up, for the method that should clear the attributes - let's name it VClearAttributes to be able to distinguish it from other redis commands.

@fukua95
Copy link
Contributor Author

fukua95 commented Jun 3, 2025

Hello, How about naming the method VClearAttr? This way it can be consistent with VSetAttr.

@ndyakov
Copy link
Member

ndyakov commented Jun 3, 2025

@fukua95 I was suggesting something similar to what you are suggesting, but the potential issue is that a user may think there is a redis command VClearAttr and that's why we voted and decided to have it completely different from the rest of the redis commands and name it VClearAttributes.

Signed-off-by: fukua95 <fukua95@gmail.com>
@fukua95
Copy link
Contributor Author

fukua95 commented Jun 3, 2025

Got it, I've made the changes.

@fukua95 fukua95 force-pushed the feat/vector-set branch from 051af9f to 1b51526 Compare June 3, 2025 13:49
Signed-off-by: fukua95 <fukua95@gmail.com>
@ndyakov
Copy link
Member

ndyakov commented Jun 3, 2025

@fukua95 thank you, will review this asap and get back to you.

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

Successfully merging this pull request may close these issues.

support vector set
3 participants