rebuildIndex method
Rebuild the HNSW index.
When to use:
- Automatic: The engine automatically rebuilds 500ms after the last operation.
- Manual: Call this if you want to force an immediate rebuild (e.g., to guarantee consistency before a critical search).
- Not needed: After
clearAllData()(which resets everything).
This operation can be slow for large datasets.
Implementation
Future<void> rebuildIndex() => _engine!.rebuildIndex();