Skip to content

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.

2 participants