Add Elasticsearch Docstore (#83)
* add Elasticsearch Docstore * update missing requirements * add docstore * [ignore cache] update default param * update docstring
This commit is contained in:
committed by
GitHub
parent
8bb7ad91e0
commit
9a96a9b876
@@ -17,14 +17,13 @@ class BaseDocumentStore(ABC):
|
||||
self,
|
||||
docs: Union[Document, List[Document]],
|
||||
ids: Optional[Union[List[str], str]] = None,
|
||||
exist_ok: bool = False,
|
||||
**kwargs,
|
||||
):
|
||||
"""Add document into document store
|
||||
|
||||
Args:
|
||||
docs: Document or list of documents
|
||||
ids: List of ids of the documents. Optional, if not set will use doc.doc_id
|
||||
exist_ok: If True, will not raise error if document already exist
|
||||
"""
|
||||
...
|
||||
|
||||
@@ -34,10 +33,15 @@ class BaseDocumentStore(ABC):
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
def get_all(self) -> dict:
|
||||
def get_all(self) -> List[Document]:
|
||||
"""Get all documents"""
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
def count(self) -> int:
|
||||
"""Count number of documents"""
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
def delete(self, ids: Union[List[str], str]):
|
||||
"""Delete document by id"""
|
||||
|
Reference in New Issue
Block a user