assign a new index to attribute attribute must already exists and not associated with an index
| 466 | // assign a new index to attribute |
| 467 | // attribute must already exists and not associated with an index |
| 468 | int 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 | |
| 490 | int Schema_RemoveIndex |
| 491 | ( |
no test coverage detected