Added/updated snippets for docs (#2318)
This commit is contained in:
68
docs/doc_examples/d06a649bc38aa9a6433b64efa78d8cb5.asciidoc
Normal file
68
docs/doc_examples/d06a649bc38aa9a6433b64efa78d8cb5.asciidoc
Normal file
@ -0,0 +1,68 @@
|
||||
// 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);
|
||||
----
|
||||
Reference in New Issue
Block a user