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

Error using bulk operation #293

Closed
yphinera opened this issue Apr 25, 2024 · 3 comments · Fixed by #294
Closed

Error using bulk operation #293

yphinera opened this issue Apr 25, 2024 · 3 comments · Fixed by #294
Assignees
Labels
bug Something isn't working

Comments

@yphinera
Copy link

When we execute a bulk script :
image

we got this error :
Caused by: org.elasticsearch.client.ResponseException: method [POST], host [http://localhost:9200], URI [_bulk], status line [HTTP/1.1 400 Bad Request]
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The bulk request must be terminated by a newline [\n]"}],"type":"illegal_argument_exception","reason":"The bulk request must be terminated by a newline [\n]"},"status":400}

while elasticsearch bulk api require a newline character \n
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
image

It seems elasticsearch-evolution lost the new line newline character
image

Could you fix it plz ?

Thanks in advance

@xtermi2 xtermi2 self-assigned this Apr 25, 2024
@xtermi2 xtermi2 added the bug Something isn't working label Apr 25, 2024
@xtermi2
Copy link
Collaborator

xtermi2 commented Apr 25, 2024

Thanks @yphinera for reporting this bug.
I hope I can provide you at the weekend a fixed version.

@xtermi2
Copy link
Collaborator

xtermi2 commented Apr 27, 2024

@yphinera can you please try out the pull request #294
you can build elasticsearch-evolution via ./mvnw clean install -DskipTests=true and set version to 0.5.2-SNAPSHOT in your application.

@yphinera
Copy link
Author

yphinera commented May 2, 2024

Hi @xtermi2 you were so fast ! Thanks a lot, the code looks good and the fix works well 👍. The issue is resolve for me.

@yphinera yphinera closed this as completed May 2, 2024
xtermi2 added a commit that referenced this issue May 2, 2024
…ll-no-longer-be-removed-from-migration-scripts

bugfix #293: trailing newlines will no longer be removed from migrati…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants