Skip to content

index per request #2940

Answered by sjrl
naor-pragma asked this question in Questions
Aug 1, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi, @naor-pragma thanks for asking your question. I believe you can achieve what you want without needing to create a new retriever for each document_store.

  1. You can add multiple indices to the same document store by specifying the index parameter in the DocumentStore.write_documents() method. The API docs explaining the parameters can be found here: https://haystack.deepset.ai/reference/document-store
  2. It's possible to specify the index parameter to the retrieve() method of the retriever. Here are the API docs on all parameters for the Retriever.retrieve() method https://haystack.deepset.ai/reference/retriever.

So I believe you can pass this on by specifying

params = {"Retriever": {"index"

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sjrl
Comment options

sjrl Aug 1, 2022
Maintainer

@naor-pragma
Comment options

Answer selected by naor-pragma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2938 on August 01, 2022 11:34.