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

Function Schema_ActivateIndex

src/schema/schema.c:511–531  ·  view source on GitHub ↗

activate pending exact-match index asserts that pending exact-match index is enabled drops current active exact-exact index if exists

Source from the content-addressed store, hash-verified

509// asserts that pending exact-match index is enabled
510// drops current active exact-exact index if exists
511void Schema_ActivateIndex
512(
513 Schema *s, // schema to activate index on
514 Index idx // index to activate
515) {
516 ASSERT(s != NULL);
517 // make sure pending index is enabled
518 ASSERT(Index_Enabled(idx) == true);
519
520 Index pending_full_text = PENDING_FULLTEXT_IDX(s);
521 Index pending_exact_match = PENDING_EXACTMATCH_IDX(s);
522
523 // index to activate must be a pending index
524 ASSERT(idx == pending_exact_match || idx == pending_full_text);
525
526 if(idx == pending_exact_match) {
527 Schema_ActivateExactMatchIndex(s);
528 } else {
529 Schema_ActivateFullTextIdx(s);
530 }
531}
532
533// index node under all schema indices
534void Schema_AddNodeToIndices

Callers 7

RdbLoadGraphContext_v13Function · 0.85
RdbLoadGraphContext_v11Function · 0.85
RdbLoadGraphContext_v9Function · 0.85
RdbLoadGraphContext_v10Function · 0.85
RdbLoadGraphContext_v8Function · 0.85
RdbLoadGraphContext_v12Function · 0.85
_indexer_idx_populateFunction · 0.85

Calls 3

Index_EnabledFunction · 0.85

Tested by

no test coverage detected