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 an ability to customize bulk api url #106

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ssbb
Copy link

@ssbb ssbb commented Sep 13, 2022

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.

@ssbb ssbb closed this Sep 13, 2022
@ssbb ssbb reopened this Sep 13, 2022
@@ -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"
Copy link
Owner

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.

Suggested change
bulk_path = index_config[:bulk_path] || "/_bulk"
bulk_path = index_config[:bulk_path] || "/_doc/_bulk"

Copy link
Author

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.

@dhaspden
Copy link

dhaspden commented Feb 7, 2023

@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!

@JoeyBG
Copy link

JoeyBG commented Oct 3, 2023

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 v2.0 release later down the road?

Thanks for the awesome library!

@dhaspden
Copy link

dhaspden commented Nov 7, 2023

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 🙏

@lovebes
Copy link

lovebes commented Jan 19, 2024

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.

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

5 participants