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

Function Index_RemoveField

src/index/index.c:400–419  ·  view source on GitHub ↗

removes fields from index

Source from the content-addressed store, hash-verified

398
399// removes fields from index
400void Index_RemoveField
401(
402 Index idx, // index modified
403 Attribute_ID attr_id // field to remove
404) {
405 ASSERT(idx != NULL);
406
407 uint fields_count = array_len(idx->fields);
408 for(uint i = 0; i < fields_count; i++) {
409 IndexField *field = idx->fields + i;
410 if(field->id == attr_id) {
411 // free field
412 IndexField_Free(field);
413 array_del_fast(idx->fields, i);
414
415 Index_Disable(idx);
416 break;
417 }
418 }
419}
420
421// query index
422RSResultsIterator *Index_Query

Callers 1

Calls 3

array_lenFunction · 0.85
IndexField_FreeFunction · 0.85
Index_DisableFunction · 0.85

Tested by

no test coverage detected