haystack-tutorials icon indicating copy to clipboard operation
haystack-tutorials copied to clipboard

New tutorial for: configurable elasticsearchdocumentstore

Open agemagician opened this issue 2 years ago • 1 comments

Describe the tutorial you would like to see here All the current tutorials assume the document store will not change over time.

For example, assume we have a single elastic database engine and need to build a single application where each user should ask a question and retrieve an answer. However, each user should have access to a different index "database" on the elastic search. The current implementation assumes a fixed document store information during application run-time, like : https://github.com/deepset-ai/haystack-tutorials/blob/main/tutorials/03_Scalable_QA_System.ipynb

It would be beneficial to have a tutorial where we can change the document store username, password, and index during application runtime. Otherwise, we must build a duplicate application for each user and each index.

Additional context None

[X] I've checked the existing tutorials

agemagician avatar Jul 06 '23 13:07 agemagician

Hi @agemagician 👋 thank you for opening the issue. You have a nice problem here. Unfortunately, you cannot change username and password during the runtime. You can change the index but it will require re-connecting every time you change it. I would recommend creating different DocumentStores rather than changing the credentials altogether. Another idea could be using metadata filtering and let Elastic handle the user management.

bilgeyucel avatar Jul 20 '23 09:07 bilgeyucel