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

Function Schema_AddIndex

src/schema/schema.c:468–488  ·  view source on GitHub ↗

assign a new index to attribute attribute must already exists and not associated with an index

Source from the content-addressed store, hash-verified

466// assign a new index to attribute
467// attribute must already exists and not associated with an index
468int Schema_AddIndex
469(
470 Index *idx, // [input/output] index to create
471 Schema *s, // schema holding the index
472 IndexField *field, // field to index
473 IndexType type // type of entities to index
474) {
475 ASSERT(s != NULL);
476 ASSERT(idx != NULL);
477 ASSERT(field != NULL);
478
479 int res;
480
481 if(type == IDX_FULLTEXT) {
482 res = Schema_AddFullTextIndex(idx, s, field);
483 } else {
484 res = Schema_AddExactMatchIndex(idx, s, field);
485 }
486
487 return res;
488}
489
490int Schema_RemoveIndex
491(

Callers 11

_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

Calls 2

Schema_AddFullTextIndexFunction · 0.85

Tested by

no test coverage detected