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

Function Index_Disable

src/index/index.c:355–371  ·  view source on GitHub ↗

disable index by increasing the number of pending changes and re-creating the internal RediSearch index

Source from the content-addressed store, hash-verified

353// disable index by increasing the number of pending changes
354// and re-creating the internal RediSearch index
355void Index_Disable
356(
357 Index idx // index to disable
358) {
359 ASSERT(idx != NULL);
360
361 idx->pending_changes++;
362
363 // drop index if exists
364 if(idx->rsIdx != NULL) {
365 RediSearch_DropIndex(idx->rsIdx);
366 idx->rsIdx = NULL;
367 }
368
369 // construct index structure
370 Index_ConstructStructure(idx);
371}
372
373// try to enable index by dropping number of pending changes by 1
374// the index is enabled once there are no pending changes

Callers 13

_RdbLoadFullTextIndexFunction · 0.85
_RdbLoadExactMatchIndexFunction · 0.85
_RdbLoadFullTextIndexFunction · 0.85
_RdbLoadExactMatchIndexFunction · 0.85
_RdbLoadSchemaFunction · 0.85
_RdbLoadSchemaFunction · 0.85
_RdbLoadSchemaFunction · 0.85
_RdbLoadFullTextIndexFunction · 0.85
_RdbLoadExactMatchIndexFunction · 0.85
Index_RemoveFieldFunction · 0.85

Calls 1

Index_ConstructStructureFunction · 0.85

Tested by

no test coverage detected