removes fields from index
| 398 | |
| 399 | // removes fields from index |
| 400 | void 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 |
| 422 | RSResultsIterator *Index_Query |
no test coverage detected