Hello, I am new to ES, please help to shed a light, does it error mean the Dev Tools Console does not handle ndjson or something else I missed? Thank you.
Hi @es2025, Welcome to the community.
First, please do not post pictures of text. It is impossible to debug, and some people can not see it. Post the text of what you want to debug. Then Perhaps we can help.
Yes Dev Console supports... did you make sure you do not have Smart Quotes on or something?
What version are you on?
I would recommend looking at
You will notice that the _bulk
API uses POST
, not PUT
, but I do not think that is the issue... but we can not debug your issue because we do not have the text / code
Post the text of your data / API request perhaps we can help.
PUT sample_data/_bulk
{"index": {}}
{"@timestamp": "2023-10-23T12:15:03.360Z", "client_ip": "172.21.2.162", "message": "Connected to 10.1.0.3", "event_duration": 3450233}
{"index": {}}
{"@timestamp": "2023-10-23T12:27:28.948Z", "client_ip": "172.21.2.113", "message": "Connected to 10.1.0.2", "event_duration": 2764889}
{"index": {}}
hi, here is mine, thank you.
As written, those commands work in the console.
Suggestion - cut and paste them from here straight back into the Dev console in the browser and try again.
The ones from screenshot above look OK too. But we cant see what hidden characters there might be messing with things.
Maybe also something weird in your browser, maybe try with "private" browser window. Check for a browser plugins/extensions that might be messing here.
And a bit better to use POST, though I do notice latest versions of API docs seem to say both PUT and POST are allowed
Thank you, you're right, I tried with another browser, it works, however not yet configured out why my configuration get messed with the new line character.
Thanks for the recommendation using POST. It is also true that both PUT and POST now allow ndjson.
thats great.
You can close this thread by accepting one of the answers.
Good luck with your project.