mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-04 13:53:16 +00:00
Add BaseDocumentStore
This commit is contained in:
parent
b5b62c569e
commit
ec7ad29d51
21
haystack/database/base.py
Normal file
21
haystack/database/base.py
Normal file
@ -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
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user