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

Added upsert option to config of the plugin that allows to use replac… #63

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

GrizliK1988
Copy link

Added upsert option to config of the plugin that allows to use replace_one method instead of insert_one when _id is present in document body.

This is useful in a scenario when the same document is being received by logstash and sent to mongodb over and over again.

Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/

…e_one method instead of insert_one when _id is present in document body. This is useful in a scenario when the same document is being received by logstash and sent to mongodb over and over again.
@kzgrzendek
Copy link

Very interested in this feature, do we know when it will be available in a future release?

@GrizliK1988
Copy link
Author

hi @kzgrzendek ,

unfortunately I haven't got any reply from maintainers yet and use fork directly.

Works well so far to me.

Regarding bulk mode - I'm not sure that it is possible in MongoDB, because there isn't replace_many or something similar method. Closes what you have is update query, but it's still different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants