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

DocumentWriter (v2) #5339

Closed
Tracked by #5265
ZanSara opened this issue Jul 12, 2023 · 0 comments · Fixed by #5435
Closed
Tracked by #5265

DocumentWriter (v2) #5339

ZanSara opened this issue Jul 12, 2023 · 0 comments · Fixed by #5435
Assignees
Labels
2.x Related to Haystack v2.0

Comments

@ZanSara
Copy link
Contributor

ZanSara commented Jul 12, 2023

Blocked by #5261


DocumentWriter is a tiny, document-store-agnostic component that simply takes one list of documents and writes it to the document store.

Example of such component:

@component
class WriteToStore(StoreAwareMixin):

    @component.input
    def input(self):
        class Input:
            documents: List[Document]
        return Input

    @component.output
    def output(self):
        class Output:
             ...
        return Output

    def run(self, data):
        self.store.write_documents(data.documents)
        return self.output()
@ZanSara ZanSara changed the title Document Writers (v2) Document Writer (v2) Jul 12, 2023
@ZanSara ZanSara changed the title Document Writer (v2) DocumentWriter (v2) Jul 12, 2023
@julian-risch julian-risch self-assigned this Jul 12, 2023
@julian-risch julian-risch added the 2.x Related to Haystack v2.0 label Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to Haystack v2.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants