-
Notifications
You must be signed in to change notification settings - Fork 74
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 an ability to customize bulk api url #106
base: master
Are you sure you want to change the base?
Conversation
lib/elasticsearch/indexing/bulk.ex
Outdated
@@ -100,6 +100,7 @@ defmodule Elasticsearch.Index.Bulk do | |||
bulk_page_size = index_config[:bulk_page_size] || 5000 | |||
bulk_wait_interval = index_config[:bulk_wait_interval] || 0 | |||
action = index_config[:bulk_action] || "create" | |||
bulk_path = index_config[:bulk_path] || "/_bulk" |
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.
@ssbb This is technically a breaking change for anyone who is currently using an old version of Elasticsearch. I would prefer to make the default "/_doc/_bulk"
here until I'm ready to release v2.0.0.
bulk_path = index_config[:bulk_path] || "/_bulk" | |
bulk_path = index_config[:bulk_path] || "/_doc/_bulk" |
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.
@danielberkompas Done! I just misread README about compatibility with older versions.
@danielberkompas any chance this could be merged and released? We are trying to migrate to Elasticsearch 8.6 and this is causing us some grief. We're working around it but of course it's quite messy. Thank you! |
Hi @danielberkompas! We're trying to migrate to Elasticsearch 8 (or OpenSearch 2 depending on the project) and this is a blocker for us as well. Is there any chance of merging this (or a similar solution) and releasing it since it's not a breaking change, even if you end up changing the default configuration in a Thanks for the awesome library! |
We've been using this fork in production for the better part of a year. Is there any way we can merge it? It's not ideal having to rely on a Github fork in production. Thank you @ssbb for doing this at any rate 🙏 |
Any updates on this one? It's a blocker for us at our company too - I'm having to copy and create our own modified Index, Bulk and mix tasks for now. |
New OpenSearch (what AWS using as well) completely removed types in urls so old url with
_doc
won't work at all.And it's optional in newer ElasticSearch (since v7 I think).
This PR adds an ability to set custom bulk url postfix and defaults to the new
/{index}/_bulk
url schema.Other Elixir ES clients using new url schema only already. Let me know what you think.