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
feat: add sparse vector storage to ElasticsearchDocumentStore (#2989)
* feat: add sparse vector storage to ElasticsearchDocumentStore (#2939)
* test: update retriever tests for new ElasticsearchDocumentStore serialization
- Update est_bm25_retriever.py and est_embedding_retriever.py to include sparse_vector_field in serialized document_store init parameters.
* test: add sync and async tests for sparse vector storage
- Add est_write_documents_with_sparse_vectors and est_write_documents_with_sparse_embedding_warning to est_document_store.py
- Add est_write_documents_async_with_sparse_vectors to est_document_store_async.py
- Update existing warning test in est_document_store_async.py
- Add est_init_with_sparse_vector_field and update serialization tests.
* style: fix B905 (strict zip) and E501 (line length) linting errors
* style: fix mypy type inference for _default_mappings
* refactor: address PR review feedback for sparse vector storage
- Add SPECIAL_FIELDS validation for sparse_vector_field in __init__
- Add sparse_vector_field to __init__ docstring
- Inject sparse_vector mapping into custom_mapping when both provided
- Extract _handle_sparse_embedding helper to deduplicate write methods
- Convert _deserialize_document to reconstruct SparseEmbedding on read
* test: address PR review feedback for sparse vector tests
- Add SPECIAL_FIELDS validation test
- Add custom_mapping injection test
- Add legacy from_dict backward compat test
- Fix async test to use async_client for index deletion
- Add retrieval reconstruction assertions to sync and async sparse tests
* fixing docstrings
* just as a safeguard original custom_mapping dict is left unchanged
* organising imports
* formatting
* adding more tests + fixing typing issues
* formatting
* updating unit tests
* adding unit tests for _handle_sparse_embedding function
---------
Co-authored-by: David S. Batista <dsbatista@gmail.com>
0 commit comments