69 lines
1.6 KiB
Plaintext
69 lines
1.6 KiB
Plaintext
// This file is autogenerated, DO NOT EDIT
|
|
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
|
|
|
[source, js]
|
|
----
|
|
const response = await client.bulk({
|
|
index: "my-index",
|
|
refresh: "true",
|
|
operations: [
|
|
{
|
|
index: {},
|
|
},
|
|
{
|
|
timestamp: "2020-04-30T14:30:17-05:00",
|
|
message:
|
|
'40.135.0.0 - - [30/Apr/2020:14:30:17 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
|
|
},
|
|
{
|
|
index: {},
|
|
},
|
|
{
|
|
timestamp: "2020-04-30T14:30:53-05:00",
|
|
message:
|
|
'232.0.0.0 - - [30/Apr/2020:14:30:53 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
|
|
},
|
|
{
|
|
index: {},
|
|
},
|
|
{
|
|
timestamp: "2020-04-30T14:31:12-05:00",
|
|
message:
|
|
'26.1.0.0 - - [30/Apr/2020:14:31:12 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
|
|
},
|
|
{
|
|
index: {},
|
|
},
|
|
{
|
|
timestamp: "2020-04-30T14:31:19-05:00",
|
|
message:
|
|
'247.37.0.0 - - [30/Apr/2020:14:31:19 -0500] "GET /french/splash_inet.html HTTP/1.0" 200 3781',
|
|
},
|
|
{
|
|
index: {},
|
|
},
|
|
{
|
|
timestamp: "2020-04-30T14:31:22-05:00",
|
|
message:
|
|
'247.37.0.0 - - [30/Apr/2020:14:31:22 -0500] "GET /images/hm_nbg.jpg HTTP/1.0" 304 0',
|
|
},
|
|
{
|
|
index: {},
|
|
},
|
|
{
|
|
timestamp: "2020-04-30T14:31:27-05:00",
|
|
message:
|
|
'252.0.0.0 - - [30/Apr/2020:14:31:27 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736',
|
|
},
|
|
{
|
|
index: {},
|
|
},
|
|
{
|
|
timestamp: "2020-04-30T14:31:28-05:00",
|
|
message: "not a valid apache log",
|
|
},
|
|
],
|
|
});
|
|
console.log(response);
|
|
----
|