Commit Graph

7 Commits

Author SHA1 Message Date
Salvatore Sanfilippo b528788f65
Fix vrand ping pong (#14183)
VRANDMEMBER had a bug when exactly two elements where present in the
vector set: we selected a fixed number of random paths to take, and this
will lead always to the same element. This PR should be kindly
back-ported to Redis 8.x.
2025-07-18 18:19:14 +08:00
Salvatore Sanfilippo 8948a5d2b2
[Vector Sets] IN operator for string/string operands (#14122)
This PR introduces "IN" overloading for strings in Vector Sets VSIM
FILTER expressions.
Now it is possible to do something like:

    "foo" IN "foobar"

IN continues to work as usually if the second operand is an array,
checking for membership of the left operand.

Ping @rowantrollope that requested this feature. I'm evaluating if to
add glob matching functionalities via the `=~` operator but I need to do
an optimization round in our glob matching function probably. Glob
matching can be slower, at the same time the complexity of the greedy
search in the graph remains unchanged, so it may be a good idea to have
it.

Case insensitive search will be likely not be added however, since this
would require handling unicode that is kinda outside the scope of Redis
filters. The user is still able to perform `"foo" in "foobar" || "FOO"
in "foobar"` at least.
2025-06-26 10:13:54 +08:00
Salvatore Sanfilippo f6d1fd08f9
Vset tests improvements (#14089)
This changes improve a bit the Vector Sets tests:

* DB9 is used instead of the target DB. After a successful test the DB
is left empty.
* If the replica is not available, the replication tests are skipped
without errors but just a warning.
* Other refactoring stuff.
2025-06-18 10:23:22 +08:00
lerman25 94aebb7324
Add config base to vector-sets and hnsw thread config (#14082)
This PR introduces the initial configuration infrastructure for
vector-sets, along with a new option:
`vset-force-single-threaded-execution`. When enabled, it applies the
`NOTHREAD` flag to VSIM and disables the `CAS` option for VADD, thereby
enforcing single-threaded execution.
Note: This mode is not optimized for single-threaded performance.

---------

Co-authored-by: GuyAv46 <47632673+GuyAv46@users.noreply.github.com>
Co-authored-by: debing.sun <debing.sun@redis.com>
2025-06-16 10:06:43 +08:00
Salvatore Sanfilippo 0ac822e154
Implement WITHATTRIBS for VSIM. (#14065)
Hi, as described, this implements WITHATTRIBS, a feature requested by a
few users, and indeed needed.
This was requested the first time by @rowantrollope but I was not sure
how to make it work with RESP2 and RESP3 in a clean way, hopefully
that's it.

The patch includes tests and documentation updates.
2025-05-27 22:12:48 +08:00
Salvatore Sanfilippo 41ecf7323e
Vector Sets: VISMEMBER and other fixes (#13941)
CI / test-ubuntu-latest (push) Failing after 31s Details
CI / test-sanitizer-address (push) Failing after 31s Details
CI / build-debian-old (push) Failing after 31s Details
CI / build-32bit (push) Failing after 31s Details
CI / build-libc-malloc (push) Failing after 31s Details
CI / build-centos-jemalloc (push) Failing after 31s Details
CI / build-old-chain-jemalloc (push) Failing after 31s Details
Codecov / code-coverage (push) Failing after 31s Details
Spellcheck / Spellcheck (push) Failing after 31s Details
CI / build-macos-latest (push) Has been cancelled Details
CodeQL / Analyze (cpp) (push) Failing after 31s Details
External Server Tests / test-external-standalone (push) Failing after 31s Details
External Server Tests / test-external-nodebug (push) Failing after 32s Details
Coverity Scan / coverity (push) Has been skipped Details
External Server Tests / test-external-cluster (push) Failing after 1m50s Details
In this PR there is also a VADD leak fixed (when wrong arity is
reported) and improvements to the test.
2025-04-15 22:58:57 +03:00
YaacovHazan 78e0d87177 Add 'modules/vector-sets/' from commit 'c6db0a7c20ff5638f3a0c9ce9c106303daeb2f67'
git-subtree-dir: modules/vector-sets
git-subtree-mainline: 8ea8f4220c
git-subtree-split: c6db0a7c20
2025-04-02 16:34:28 +03:00