redis_hnsw
redis_hnsw copied to clipboard
Periods in a node's name cause search results to be truncated
When a node's name contains a period (.
), only the strings on the right-side of the period show up in the search result.
How to reproduce
- Create an index
HNSW.NEW test DIM 3
- Add nodes
HNSW.NODE.ADD test aaa.txt DATA 3 1.0 1.0 1.0 HNSW.NODE.ADD test bbb.txt DATA 3 1.0 1.0 1.0 HNSW.NODE.ADD test ccc.txt DATA 3 1.0 1.0 1.0
- Search
HNSW.SEARCH test K 3 QUERY 3 1.0 1.0 1.0
Expected output
[
3,
['similarity', '-0', 'name', 'aaa.txt'],
['similarity', '-0', 'name', 'bbb.txt'],
['similarity', '-0', 'name', 'ccc.txt']
]
Actual output
[
3,
['similarity', '-0', 'name', 'txt'],
['similarity', '-0', 'name', 'txt'],
['similarity', '-0', 'name', 'txt']
]
- Redis version:
Redis server v=5.0.7 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=636cde3b5c7a3923
- libredis_hnsw.so version: v0.2.1