Switch SQLite ANN connections when load() is given a new path

This commit is contained in:
kartsan03
2026-10-10 11:11:24 +00:00
parent 084a1eca4d
commit fe1fbbc933
2 changed files with 4 additions and 0 deletions
@@ -140,6 +140,8 @@ class TestSQLite(DenseTest):
# Load new copy and check that it has all the changes
model = ANNFactory.create(model.config)
model.load(index)
self.assertEqual(model.count(), 500)
model.load(new)
self.assertEqual(model.count(), 509)
self.assertEqual(len(model.search(np.random.rand(1, 240).astype(np.float32), 10)[0]), 10)