-
Notifications
You must be signed in to change notification settings - Fork 183
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
[BUG] Cannot Send Bulk Requests #64
Comments
@Nesdom13 could you please elaborate more on what kind of error message you see? Also, how do you configure |
I'm attempting to use the .bulk method on the client which takes in a BulkRequest. To build the BulkRequest I am using the following: That recordListJson that is being passed in is being built as follows: `
` I also tried building it as follows: `
` Here is an example of the error: |
@Nesdom13 ok, it seems like the Bulk request submission for Rest Client is completely broken right now: the request payload is supposed to send individual JSON objects (streams), separated by new line
This is what is server expects:
I know, the message you are getting is confusing, perhaps the cause why it fails is clear now, although I don't have a workaround for you, it seems like another autogenerator issue. [1] https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/bulk/ |
Any updates on this ? |
If @Nesdom13 @cherryramatisdev want to help, turn this into a failing test (and maybe a fix)? |
@cherryramatisdev @dblock the
That would result in correct JSON being sent out:
Hope it helps, sorry for delayed response. |
@reta Much thanks! @VachaShah We probably need some documentation for this and we can close? |
Sure, let me see where we can document this. WDYT of the Using Java Client section? |
What is the bug?
When attempting to use the .bulk endpoint, the following error is thrown: "The bulk request must be terminated by a newline [\n]"
How can one reproduce the bug?
Steps to reproduce the behavior:
What is the expected behavior?
The bulk request should be accepted and actioned.
What is your host/environment?
Do you have any additional context?
I attempted to use both Jakarta JsonObject and Jakarta JsonString. With the object I used the builder .add method to add entries for the actions and the document information, with the JsonString I built a string that held the json and ended in the new line character and that still didn't work.
The text was updated successfully, but these errors were encountered: