Elasticsearch _bulk insert node js axios

  `{ "update" : {"_id" : "1", "_index" : "test"} }\n{ "doc" : {"field2" : "value2"} }\n`, {
    headers: {
      'Content-type': 'application/json'
  auth: { username: 'user', password: 'pass' }
).then((result) => {
  console.log('result _bulk', result.data.items);
}).catch((err) => {
  console.log('err', err);


Please take your time to properly write up your problem. Just copy pasting a code snippet is pretty useless if you do not explain what error you are received, what outcome you would have been expected, what elasticsearchversion you are testing against, how the same requests looks via curl or the dev-tools.

Creating a proper issue/writeup requires some time, but will increase your chances of getting a reply a lot.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.