You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ElasticsearchVectorStore: no reconnect persistence + deprecated/removed body= (breaks on es-py 9.x) — hidden by MagicMock #833
ElasticsearchVectorStore (src/synapsekit/retrieval/elasticsearch_vector.py), previously only MagicMock-tested, had two bugs found via real elasticsearch:8.15 testcontainers (epic #829).
Bugs
No reconnect persistence — search() returned [] whenever not self._index_created and self._dims is None, so a freshly reconnected instance never found vectors already indexed in Elasticsearch. (Proven: write with one client, read with a second → empty.)
Deprecated/removed body= — indices.create(..., body=...) and search(..., body=...) are deprecated in elasticsearch-py 8.x (DeprecationWarning) and removed in 9.x, so the store breaks entirely for users on the 9.x client (the elasticsearch extra is unpinned >=8.0).
Fix
Use modern kwargs: indices.create(index=, mappings=...) and search(index=, knn=..., size=...).
Drop the _dims is None guard; _search_sync returns [] on NotFoundError (covers search-before-add and reconnect).
Test
Real elasticsearch:8.15.3 testcontainer: true kNN nearest-neighbour ranking, metadata filter, top_k, persistence across reconnect, empty/negative. Replaces the MagicMock test; runs in the CI integration job.
Activity
fix(retrieval): make ElasticsearchVectorStore work on reconnect and m…