MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / Index_RemoveEdge

Function Index_RemoveEdge

src/index/index_edge.c:53–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void Index_RemoveEdge
54(
55 Index idx, // index to update
56 const Edge *e // edge to remove from index
57) {
58 ASSERT(e != NULL);
59 ASSERT(idx != NULL);
60
61 RSIndex *rsIdx = Index_RSIndex(idx);
62 EntityID src_id = Edge_GetSrcNodeID(e);
63 EntityID dest_id = Edge_GetDestNodeID(e);
64 EntityID edge_id = ENTITY_GET_ID(e);
65
66 EdgeIndexKey key = {.src_id = src_id, .dest_id = dest_id, .edge_id = edge_id};
67 size_t key_len = sizeof(EdgeIndexKey);
68 RediSearch_DeleteDocument(rsIdx, &key, key_len);
69}
70

Callers 2

Index_IndexEdgeFunction · 0.85

Calls 3

Index_RSIndexFunction · 0.85
Edge_GetSrcNodeIDFunction · 0.85
Edge_GetDestNodeIDFunction · 0.85

Tested by

no test coverage detected