Skip to content
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

Is there a way to MilvusEmbeddingRetriever to support multiple document_store? #44

Closed
Silence-Well opened this issue Feb 14, 2025 · 3 comments

Comments

@Silence-Well
Copy link

I have stored different data in different collections based on various sources, so I have defined multiple MilvusDocumentStores. Then, how can I retrieving from multiple document_store simultaneously in the MilvusEmbeddingRetriever? Thank you for your support. @zc277584121

retriever = MilvusEmbeddingRetriever(
    document_store=self.document_store, # How to retriever multiple document_store?
    top_k=top_k
)
@zc277584121
Copy link
Collaborator

@Silence-Well I think currently MilvusEmbeddingRetriever can not satisfy this requirement. Maybe the best workaround is to subclass the class MilvusEmbeddingRetriever , and then override and implement your costomized logic in it.

@Silence-Well
Copy link
Author

My current solution is to define two MilvusEmbeddingRetriever instances and add them to the pipeline. Finally, merge the two sets of results, documents, into one docs, which can indirectly solve this problem.

@zc277584121
Copy link
Collaborator

Good, that is also a nice solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants