mirror of https://mirror.osredm.com/root/redis.git
Fix VLINKS after adding attributes.
This commit is contained in:
parent
68dccc55ad
commit
2d311dbb01
3
vset.c
3
vset.c
|
@ -1176,7 +1176,8 @@ int VLINKS_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
|
||||||
|
|
||||||
/* Add each neighbor's element value to the array. */
|
/* Add each neighbor's element value to the array. */
|
||||||
for (uint32_t j = 0; j < node->layers[i].num_links; j++) {
|
for (uint32_t j = 0; j < node->layers[i].num_links; j++) {
|
||||||
RedisModule_ReplyWithString(ctx, node->layers[i].links[j]->value);
|
struct vsetNodeVal *nv = node->layers[i].links[j]->value;
|
||||||
|
RedisModule_ReplyWithString(ctx, nv->item);
|
||||||
if (withscores) {
|
if (withscores) {
|
||||||
float distance = hnsw_distance(vset->hnsw, node, node->layers[i].links[j]);
|
float distance = hnsw_distance(vset->hnsw, node, node->layers[i].links[j]);
|
||||||
/* Convert distance to similarity score to match
|
/* Convert distance to similarity score to match
|
||||||
|
|
Loading…
Reference in New Issue