From f65185de936a60883254596489c5ac97479b44ba Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Wed, 17 Oct 2018 14:37:48 -0500 Subject: [PATCH 1/3] ingest: documentation for the drop processor --- docs/reference/ingest/ingest-node.asciidoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/reference/ingest/ingest-node.asciidoc b/docs/reference/ingest/ingest-node.asciidoc index 0241751a4df3b..335463b1a9b87 100644 --- a/docs/reference/ingest/ingest-node.asciidoc +++ b/docs/reference/ingest/ingest-node.asciidoc @@ -1242,6 +1242,21 @@ Reference key modifier example * error = REFUSED |====== +[[drop-processor]] +=== Drop Processor +Drops the document without raising any an errors. This is useful to prevent the document from +getting indexed based on some condition. + +[source,js] +-------------------------------------------------- +{ + "drop": { + "if" : "ctx.tags.contains('production') != true" + } +} +-------------------------------------------------- +// NOTCONSOLE + [[dot-expand-processor]] === Dot Expander Processor From edc38113203eb7f0cbacaa97cefbe6974dec5519 Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Thu, 18 Oct 2018 09:16:22 -0500 Subject: [PATCH 2/3] correct typo --- docs/reference/ingest/ingest-node.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ingest/ingest-node.asciidoc b/docs/reference/ingest/ingest-node.asciidoc index 335463b1a9b87..9df1a9661094f 100644 --- a/docs/reference/ingest/ingest-node.asciidoc +++ b/docs/reference/ingest/ingest-node.asciidoc @@ -1244,7 +1244,7 @@ Reference key modifier example [[drop-processor]] === Drop Processor -Drops the document without raising any an errors. This is useful to prevent the document from +Drops the document without raising any errors. This is useful to prevent the document from getting indexed based on some condition. [source,js] From 8bfc93795d3d761b79e9ac8c64e580ddb976ae0e Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Tue, 23 Oct 2018 09:58:25 -0500 Subject: [PATCH 3/3] update example --- docs/reference/ingest/ingest-node.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ingest/ingest-node.asciidoc b/docs/reference/ingest/ingest-node.asciidoc index 9df1a9661094f..11d584cb6d60e 100644 --- a/docs/reference/ingest/ingest-node.asciidoc +++ b/docs/reference/ingest/ingest-node.asciidoc @@ -1251,7 +1251,7 @@ getting indexed based on some condition. -------------------------------------------------- { "drop": { - "if" : "ctx.tags.contains('production') != true" + "if" : "ctx.network_name == 'Guest'" } } --------------------------------------------------