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

Add possibility to delete docs from Elasticsearch. #373

Open
jann opened this issue Feb 12, 2020 · 5 comments
Open

Add possibility to delete docs from Elasticsearch. #373

jann opened this issue Feb 12, 2020 · 5 comments
Labels
caches Any tasks or issues relating to cache resources enhancement

Comments

@jann
Copy link

jann commented Feb 12, 2020

We recently had the use case to write and delete documents from elasticsearch using benthos. Currently I dont see the option in benthos to be able to delete documents from elasticsearch. Do you think this would be a useful feature? I am thinking of contributing this feature to this open source project, but would like to ask before if you have thoughts about it. Thank you.

@Jeffail Jeffail added caches Any tasks or issues relating to cache resources enhancement labels Feb 12, 2020
@Jeffail
Copy link
Collaborator

Jeffail commented Feb 12, 2020

Hey @jann, this would be great. We could add an elasticsearch cache type that would enable this.

@jann
Copy link
Author

jann commented Feb 12, 2020

Hi @Jeffail. Would it be possible to dynamically write or delete documents based on a value in the metadata? What are your thoughts about this? Or would you rather cover this use case by running two benthos in parallel, one writing into elasticsearch the other deleting from it and filtering the corresponding delete/write messages before in a processor.

@DpoBoceka
Copy link
Contributor

As an alternative, you're able to have http processor to perform a crafted REST API request to your target Elasticsearch.
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html

@DpoBoceka
Copy link
Contributor

Shouldn't be much of a problem given http processor supports interpolation in it.

@Jeffail
Copy link
Collaborator

Jeffail commented Feb 12, 2020

Would it be possible to dynamically write or delete documents based on a value in the metadata?

Yeah, if it's a cache type then we can do all kinds of weird and freaky things with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
caches Any tasks or issues relating to cache resources enhancement
Projects
None yet
Development

No branches or pull requests

3 participants