-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[vector sets] Support for VSIM WITHATTRIBS (CAE-1421) #4260
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
Conversation
- mark tests for WITHATTRIBS with SINCE 8.2.0
- Use JedisByteMap for binary methods
- mark tests for WITHATTRIBS with SINCE 8.2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for the VSIM WITHATTRIBS command to retrieve both similarity scores and element attributes in vector set similarity searches. The main changes include adding a new VSimScoreAttribs response class and implementing methods for retrieving scores and attributes together.
- New methods
vsimWithScoresAndAttribsandvsimByElementWithScoresAndAttribsfor both string and binary keys - VSimScoreAttribs response class to encapsulate score and attributes data
- Comprehensive test coverage for the new functionality including binary operations
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| VSimScoreAttribs.java | New response class containing similarity score and attributes |
| VectorSetCommands.java | Interface definitions for new methods with scores and attributes |
| VectorSetBinaryCommands.java | Binary interface definitions for new methods |
| UnifiedJedis.java | Implementation of new methods in unified client |
| Jedis.java | Implementation of new methods in Jedis client |
| CommandObjects.java | Command object creation for new VSIM operations |
| BuilderFactory.java | Response builders for VSimScoreAttribs maps |
| Protocol.java | Added WITHATTRIBS keyword |
| VectorSetCommandsTestBase.java | Comprehensive test cases for new functionality |
| VectorSetCommandsTest.java | Additional test methods |
| pom.xml | Include VSimScoreAttribs in test configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/test/java/redis/clients/jedis/commands/unified/VectorSetCommandsTestBase.java
Outdated
Show resolved
Hide resolved
src/test/java/redis/clients/jedis/commands/unified/VectorSetCommandsTestBase.java
Outdated
Show resolved
Hide resolved
src/main/java/redis/clients/jedis/commands/VectorSetBinaryCommands.java
Outdated
Show resolved
Hide resolved
- remove unused import - remove unused helper methods
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [redis.clients:jedis](https://github.com/redis/jedis) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `6.1.0` -> `6.2.0` | | [com.google.cloud:google-cloud-spanner](https://github.com/googleapis/java-spanner) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `6.98.1` -> `6.99.0` | --- ### Release Notes <details> <summary>redis/jedis (redis.clients:jedis)</summary> ### [`v6.2.0`](https://github.com/redis/jedis/releases/tag/v6.2.0): 6.2.0 ### Changes #### 🚀 New Features - \[vector sets] Support for VSIM WITHATTRIBS (CAE-1421) ([#​4260](redis/jedis#4260)) - Support Redis 8 vector sets [#​4169](redis/jedis#4169) ([#​4203](redis/jedis#4203)) #### 🐛 Bug Fixes - Fix JedisBroadcastException in functionLoadReplace for Redis Cluster ([#​4219](redis/jedis#4219)) #### 🧰 Maintenance - Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.2 to 3.11.3 ([#​4246](redis/jedis#4246)) - Bump org.junit:junit-bom from 5.13.3 to 5.13.4 ([#​4216](redis/jedis#4216)) - docs: Improve Javadoc for HostAndPortMapper ([#​4112](redis/jedis#4112)) ([#​4227](redis/jedis#4227)) #### Contributors We'd like to thank all the contributors who worked on this release! [@​JuneYub](https://github.com/JuneYub), [@​Kguswo](https://github.com/Kguswo), [@​dependabot](https://github.com/dependabot), [@​dependabot](https://github.com/dependabot)\[bot] and [@​ggivo](https://github.com/ggivo) </details> <details> <summary>googleapis/java-spanner (com.google.cloud:google-cloud-spanner)</summary> ### [`v6.99.0`](https://github.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6990-2025-08-26) ##### Features - Support read lock mode for R/W transactions ([#​4010](googleapis/java-spanner#4010)) ([7d752d6](googleapis/java-spanner@7d752d6)) ##### Bug Fixes - **deps:** Update the Java code generator (gapic-generator-java) to 2.62.0 ([52c68db](googleapis/java-spanner@52c68db)) - GetCommitResponse() should return error if tx has not committed ([#​4021](googleapis/java-spanner#4021)) ([a2c179f](googleapis/java-spanner@a2c179f)) ##### Dependencies - Update dependency com.google.cloud:sdk-platform-java-config to v3.52.0 ([#​4024](googleapis/java-spanner#4024)) ([7e3294f](googleapis/java-spanner@7e3294f)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: 9d031eaaab2d726402884bd41681c856931f12f0
Closes #4259