Added/updated snippets for docs (#2318)
This commit is contained in:
31
docs/doc_examples/3d82257167e8a14a7f474848b32da128.asciidoc
Normal file
31
docs/doc_examples/3d82257167e8a14a7f474848b32da128.asciidoc
Normal file
@ -0,0 +1,31 @@
|
||||
// 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.ingest.putPipeline({
|
||||
id: "set_bar",
|
||||
description: "sets the value of bar from the field foo",
|
||||
processors: [
|
||||
{
|
||||
set: {
|
||||
field: "bar",
|
||||
copy_from: "foo",
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.ingest.simulate({
|
||||
id: "set_bar",
|
||||
docs: [
|
||||
{
|
||||
_source: {
|
||||
foo: ["foo1", "foo2"],
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log(response1);
|
||||
----
|
||||
Reference in New Issue
Block a user