32 lines
662 B
Plaintext
32 lines
662 B
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.ingest.simulate({
|
|
pipeline: {
|
|
description: "parse multiple patterns",
|
|
processors: [
|
|
{
|
|
grok: {
|
|
field: "message",
|
|
patterns: ["%{FAVORITE_DOG:pet}", "%{FAVORITE_CAT:pet}"],
|
|
pattern_definitions: {
|
|
FAVORITE_DOG: "beagle",
|
|
FAVORITE_CAT: "burmese",
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
docs: [
|
|
{
|
|
_source: {
|
|
message: "I love burmese cats!",
|
|
},
|
|
},
|
|
],
|
|
});
|
|
console.log(response);
|
|
----
|