Breaking changes docs for template index_patterns

0219a211d3 added support for templates
to have multiple patterns and renamed `template` to `index_patterns`.
This adds the breaking changes docs for that.
This commit is contained in:
Nik Everett 2016-11-11 10:11:46 -05:00
parent adb7aaded4
commit 7c3886769f
2 changed files with 32 additions and 0 deletions

View File

@ -31,6 +31,7 @@ way to reindex old indices is to use the `reindex` API.
* <<breaking_60_cluster_changes>>
* <<breaking_60_settings_changes>>
* <<breaking_60_plugins_changes>>
* <<breaking_60_indices_changes>>
include::migrate_6_0/cat.asciidoc[]
@ -45,3 +46,5 @@ include::migrate_6_0/cluster.asciidoc[]
include::migrate_6_0/settings.asciidoc[]
include::migrate_6_0/plugins.asciidoc[]
include::migrate_6_0/indices.asciidoc[]

View File

@ -0,0 +1,29 @@
[[breaking_60_indices_changes]]
=== Templates changes
==== `template` is now `index_patterns`
Previously templates expressed the indices that they should match using a glob
style pattern in the `template` field. They should now use the `index_patterns`
field instead. As the name implies you can define multiple glob style patterns
in an array but for convenience defining a single pattern as a bare string is
also supported. So both of these examples are valid:
[source,js]
--------------------------------------------------
PUT _template/template_1
{
"index_patterns": ["te*", "bar*"],
"settings": {
"number_of_shards": 1
}
}
PUT _template/template_2
{
"index_patterns": "te*",
"settings": {
"number_of_shards": 1
}
}
--------------------------------------------------
// CONSOLE