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

Introduce DCDocumentStore and allow it to read documents #1982

Closed
tstadel opened this issue Jan 10, 2022 · 0 comments · Fixed by #1991
Closed

Introduce DCDocumentStore and allow it to read documents #1982

tstadel opened this issue Jan 10, 2022 · 0 comments · Fixed by #1991
Assignees
Labels

Comments

@tstadel
Copy link
Member

tstadel commented Jan 10, 2022

In order to communicate with DocumentStores in DC we need a readonly DocumentStore implementation that is compatible with all retrievers incl. ElasticsearchRetriever.

First we want it to be initialized and able to retrieve all documents without actually querying.
It should be initialized like that:
doc_store = DCDocumentStore(api_key="apikey", index="my_index", workspace="default")

The following methods need to be implemented:

method API Call
init GET api/v1/workspaces/{workspace_name}/indexes/{index_name}
get_all_documents GET api/v1/workspaces/{workspace_name}/indexes/{index_name}/documents
get_all_documents_generator POST api/v1/workspaces/{workspace_name}/indexes/{index_name}/documents-stream
get_document_by_id GET api/v1/workspaces/{workspace_name}/indexes/{index_name}/documents/{document_id}
get_documents_by_id GET api/v1/workspaces/{workspace_name}/indexes/{index_name}/documents/{document_id}
get_document_count POST api/v1/workspaces/{workspace_name}/indexes/{index_name}/documents-count

Documents are supposed to be fetched via paging.

@tstadel tstadel changed the title Introduce DCDocumentStore as readonly implementation Introduce DCDocumentStore and allow it to read documents Jan 10, 2022
@tstadel tstadel self-assigned this Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant