Skip to content

fix(python,java,node,rust): add missing vector search 1.1 args#5550

Open
edlng wants to merge 2 commits intomainfrom
edlng/vss-1.1-missing-args
Open

fix(python,java,node,rust): add missing vector search 1.1 args#5550
edlng wants to merge 2 commits intomainfrom
edlng/vss-1.1-missing-args

Conversation

@edlng
Copy link
Collaborator

@edlng edlng commented Mar 9, 2026

Summary

In Valkey Search 1.1, some arguments were missed in FT.SEARCH such as DIALECT and NOCONTENT. This PR adds it and fixes the response handling in the core.

Issue link

Closes #5626

Features / Behaviour Changes

  • DIALECT
  • NOCONTENT

Implementation

New args added for each language, response handling changed in the core

Limitations

Testing

New test cases have been added.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated.
  • Linters have been run (make *-lint targets) and Prettier has been run (make prettier-fix).
  • Destination branch is correct - main or release
  • Create merge commit if merging release branch into main, squash otherwise.

@edlng edlng requested a review from a team as a code owner March 9, 2026 18:11
@edlng edlng marked this pull request as draft March 9, 2026 18:12
@edlng edlng force-pushed the edlng/vss-1.1-missing-args branch from aa2d96f to 77481b6 Compare March 10, 2026 16:00
@edlng edlng force-pushed the edlng/vss-1.1-missing-args branch from 77481b6 to 42f6616 Compare March 11, 2026 22:19
@edlng edlng force-pushed the edlng/vss-1.1-missing-args branch from 42f6616 to 605f21a Compare March 23, 2026 21:52
@edlng edlng marked this pull request as ready for review March 23, 2026 21:53
Signed-off-by: Edward Liang <edward.liang@improving.com>
)
assert await glide_client.hset(key1, {vec_field: vector1}) == 1
assert await glide_client.hset(key2, {vec_field: vector2}) == 1
time.sleep(self.sleep_wait_time)
Copy link
Collaborator

@xShinnRyuu xShinnRyuu Mar 23, 2026

Choose a reason for hiding this comment

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

We probably shouldnt be using time.sleep() for an async test

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I noticed that it was also a recurring pattern in the existing tests of this file. Should we replace them all?

== OK
)
assert await glide_client.hset(key1, {vec_field: vector1}) == 1
time.sleep(self.sleep_wait_time)
Copy link
Collaborator

Choose a reason for hiding this comment

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

similar here probably should not use time.sleep() which will blocking the thread

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

see comment above

@xShinnRyuu xShinnRyuu requested a review from Aryex March 23, 2026 22:15
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you check the formatting for this file? The spacing seems weird.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Talked with Kiro about it, but apparently it follows the Google Java Style convention. Running spotless checks also pass. I do agree formatting might be a bit weird but I think a lot of the existing Java files follow this convention so fixing it might be a project-wide task 😵‍💫


@SneakyThrows
@Test
public void ft_search_nocontent() {
Copy link
Collaborator

@Aryex Aryex Mar 23, 2026

Choose a reason for hiding this comment

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

So from what I gathered, this test is doing:

  1. Insert 2 vectors into test db
  2. Search for them with NOCONTENT set.
  3. assert that the return value is correct.

The additional vector syntax make this test feels complicated for me. Since the focus is to check nocontent was applied, could we just use a simple set and get test with nocontent and assert the response?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we should keep this test as is. The issue with NOCONTENT was that it had to change the way the response was converted in core. IMO, probably better to leave it like this to verify the parsing and everything isn't broken.


FTSearchOptions options =
FTSearchOptions.builder()
.dialect(2)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since only dialect 2 is supported, what is expected to happen if dialect 1 is specified?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

An error is thrown DIALECT requires a non negative integer >=2 and <= 4

Signed-off-by: Edward Liang <edward.liang@improving.com>
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

Successfully merging this pull request may close these issues.

(Python, Node, Java, Core): Missing options/arguments for Valkey Search 1.1 commands

3 participants