From ec7ad29d5103f7c6a96ec5980ea76d1f4c8a89df Mon Sep 17 00:00:00 2001 From: Tanay Soni Date: Wed, 22 Jan 2020 15:53:04 +0100 Subject: [PATCH] Add BaseDocumentStore --- haystack/database/base.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 haystack/database/base.py diff --git a/haystack/database/base.py b/haystack/database/base.py new file mode 100644 index 000000000..5a5ada63c --- /dev/null +++ b/haystack/database/base.py @@ -0,0 +1,21 @@ +from abc import abstractmethod + + +class BaseDocumentStore: + """ + Base class for implementing DataStores. + """ + + @abstractmethod + def write_documents(self, documents): + pass + + @abstractmethod + def get_document_by_id(self, id): + pass + + @abstractmethod + def get_document_ids_by_tag(self, tag): + pass + +