summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/reference/api-conventions.asciidoc1
-rw-r--r--docs/reference/indices/templates.asciidoc46
-rw-r--r--docs/reference/ingest/ingest-node.asciidoc52
3 files changed, 98 insertions, 1 deletions
diff --git a/docs/reference/api-conventions.asciidoc b/docs/reference/api-conventions.asciidoc
index e5a1be8812..282b5528aa 100644
--- a/docs/reference/api-conventions.asciidoc
+++ b/docs/reference/api-conventions.asciidoc
@@ -219,6 +219,7 @@ Some examples are:
`2015-01-01||+1M/d`:: `2015-01-01` plus one month, rounded down to the nearest day.
[float]
+[[common-options-response-filtering]]
=== Response Filtering
All REST APIs accept a `filter_path` parameter that can be used to reduce
diff --git a/docs/reference/indices/templates.asciidoc b/docs/reference/indices/templates.asciidoc
index 39cbdbf017..ac515575c9 100644
--- a/docs/reference/indices/templates.asciidoc
+++ b/docs/reference/indices/templates.asciidoc
@@ -181,3 +181,49 @@ for indices of that start with `te*`, source will still be enabled.
Note, for mappings, the merging is "deep", meaning that specific
object/property based mappings can easily be added/overridden on higher
order templates, with lower order templates providing the basis.
+
+[float]
+[[versioning-templates]]
+=== Template Versioning
+
+Templates can optionally add a `version` number, which can be any integer value,
+in order to simplify template management by external systems. The `version`
+field is completely optional and it is meant solely for external management of
+templates. To unset a `version`, simply replace the template without specifying
+one.
+
+[source,js]
+--------------------------------------------------
+PUT /_template/template_1
+{
+ "template" : "*",
+ "order" : 0,
+ "settings" : {
+ "number_of_shards" : 1
+ },
+ "version": 123
+}
+--------------------------------------------------
+// CONSOLE
+
+To check for the `version`, you can
+<<common-options-response-filtering, filter responses>>
+using `filter_path` to limit the response to just the `version`:
+
+[source,js]
+--------------------------------------------------
+GET /_template/template_1?filter_path=*.version
+--------------------------------------------------
+// TEST[continued]
+
+This should give a small response that makes it both easy and inexpensive to parse:
+
+[source,js]
+--------------------------------------------------
+{
+ "template_1" : {
+ "version" : 123
+ }
+}
+--------------------------------------------------
+// TESTRESPONSE \ No newline at end of file
diff --git a/docs/reference/ingest/ingest-node.asciidoc b/docs/reference/ingest/ingest-node.asciidoc
index 013275c046..d905d84e33 100644
--- a/docs/reference/ingest/ingest-node.asciidoc
+++ b/docs/reference/ingest/ingest-node.asciidoc
@@ -90,6 +90,56 @@ For each returned pipeline, the source and the version are returned.
The version is useful for knowing which version of the pipeline the node has.
You can specify multiple IDs to return more than one pipeline. Wildcards are also supported.
+[float]
+[[versioning-pipelines]]
+==== Pipeline Versioning
+
+Pipelines can optionally add a `version` number, which can be any integer value,
+in order to simplify pipeline management by external systems. The `version`
+field is completely optional and it is meant solely for external management of
+pipelines. To unset a `version`, simply replace the pipeline without specifying
+one.
+
+[source,js]
+--------------------------------------------------
+PUT _ingest/pipeline/my-pipeline-id
+{
+ "description" : "describe pipeline",
+ "version" : 123,
+ "processors" : [
+ {
+ "set" : {
+ "field": "foo",
+ "value": "bar"
+ }
+ }
+ ]
+}
+--------------------------------------------------
+// CONSOLE
+
+To check for the `version`, you can
+<<common-options-response-filtering, filter responses>>
+using `filter_path` to limit the response to just the `version`:
+
+[source,js]
+--------------------------------------------------
+GET /_ingest/pipeline/my-pipeline-id?filter_path=*.version
+--------------------------------------------------
+// TEST[continued]
+
+This should give a small response that makes it both easy and inexpensive to parse:
+
+[source,js]
+--------------------------------------------------
+{
+ "my-pipeline-id" : {
+ "version" : 123
+ }
+}
+--------------------------------------------------
+// TESTRESPONSE
+
[[delete-pipeline-api]]
=== Delete Pipeline API
@@ -1639,4 +1689,4 @@ pipeline should be used:
--------------------------------------------------
The reason for this is that Ingest doesn't know how to automatically cast
-a scalar field to an object field. \ No newline at end of file
+a scalar field to an object field.