Commit 470693f
committed
Fix: Ensure embedding indexes are created even when schemas are reused
When wikidata schemas already exist (from previous imports), they are reused
and new_schema() is not called, which means post_schema_add() is never called,
which means embedding indexes are never created.
Add ensure_embedding_indexes() method that explicitly creates embedding indexes
after schema initialization, regardless of whether schemas were newly created
or reused. This ensures embedding search works correctly for all imports.
The method:
- Checks if embedding service is available
- Creates embedding index for entity metadata description field
- Handles case where index already exists gracefully
This fixes the issue where 'similar' command in interactive mode fails with
'Index not found: CellDoesNotExisted' error.1 parent 987f220 commit 470693f
1 file changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
559 | 599 | | |
560 | 600 | | |
561 | 601 | | |
| |||
0 commit comments