-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add update_document_meta
to InMemoryDocumentStore
#2689
Conversation
The failing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! However we should enforce this method for all document stores by making update_document_meta
an abstract method of BaseDocumentStore
if there is not a good reason against it.
@@ -480,6 +480,19 @@ def get_document_count( | |||
) | |||
return len(documents) | |||
|
|||
def update_document_meta(self, id: str, meta: Dict[str, Any], index: str = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make that now an abstractmethod of BaseDocumentStore
? I think the only document store that does not support it would be DeepsetCloudDocumentStore
and given its read-only nature that is not a show-stopper here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it to BaseDocumentStore
…e' into update_doc_meta_for_inmemdocstore
@bogdankostic The breaking change tag is because of the changed order of args within ElasticsearchDocumentStore's implementation, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Yes, exactly. |
* Add update_document_meta to InMemoryDocumentStore * Fix typo * Update Documentation & Code Style * Add update_document_meta to BaseDocumentStore * Update Documentation & Code Style * Fix mypy * Update Documentation & Code Style * Add update_document_meta to MockDocumentStore Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Proposed changes:
InMemoryDocumentStore
was the only DocumentStore that did not supportupdate_document_meta
. This PR adds theupdate_document_meta
method to theInMemoryDocumentStore
.Status (please check what you already did):
Breaking Change
As we added
update_document_meta
toBaseDocumentStore
, we needed to change the signature ofupdate_document_meta
inElasticsearchDocumentStore
.