-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrievers: should document_store
be a private attribute?
#69
Comments
Yeah, doesn't make much sense for the Document Store to be public. Also if you created an instance of that Component I would expect you must have also built the Document Store it's using. |
What if I'm reading a pipeline from Yaml? I can still get the retriever with |
Good point, that indeed could be a use case. 🤔 |
Let's agree that yes, it's ok to expose the document store instance and close this issue. I'm not sure we should enforce a convention right now, it's an easy fix and we can patch integrations as we need it, but in case you want to schedule some work to uniform the existing document stores, please open another issue with a checklist of what should be done. |
Retrievers of
InMemoryDocumentStore
(InMemoryBM25Retriever
...) have the attributedocument_store
Retrievers of Elasticsearch and Opensearch Document Store have the attribute
_document_store
We should probably agree on a consistent approach,
so that for example
pipeline.get_component("retriever").document_store
always works.@silvanocerza
The text was updated successfully, but these errors were encountered: