mirror of https://mirror.osredm.com/root/redis.git
Expr filtering: fixed a few bugs.
This commit is contained in:
parent
097f310797
commit
2d1642504d
4
vset.c
4
vset.c
|
@ -207,7 +207,7 @@ int vectorSetInsert(struct vsetObject *o, float *vec, int8_t *qvec, float qrange
|
||||||
if (attrib != NULL) o->numattribs++;
|
if (attrib != NULL) o->numattribs++;
|
||||||
RedisModule_DictSet(o->dict,val,node);
|
RedisModule_DictSet(o->dict,val,node);
|
||||||
RedisModule_RetainString(NULL,val);
|
RedisModule_RetainString(NULL,val);
|
||||||
if (attrib) RedisModule_RetainString(NULL,val);
|
if (attrib) RedisModule_RetainString(NULL,attrib);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ int VADD_CASReply(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
|
||||||
// Then: insert the node in the HNSW data structure.
|
// Then: insert the node in the HNSW data structure.
|
||||||
hnswNode *newnode;
|
hnswNode *newnode;
|
||||||
if ((newnode = hnsw_try_commit_insert(vset->hnsw, ic)) == NULL) {
|
if ((newnode = hnsw_try_commit_insert(vset->hnsw, ic)) == NULL) {
|
||||||
newnode = hnsw_insert(vset->hnsw, vec, NULL, 0, 0, val, ef);
|
newnode = hnsw_insert(vset->hnsw, vec, NULL, 0, 0, nv, ef);
|
||||||
}
|
}
|
||||||
RedisModule_DictSet(vset->dict,val,newnode);
|
RedisModule_DictSet(vset->dict,val,newnode);
|
||||||
val = NULL; // Don't free it later.
|
val = NULL; // Don't free it later.
|
||||||
|
|
Loading…
Reference in New Issue