Skip to content

Commit

Permalink
Update documentation to use year format instead of week year format.
Browse files Browse the repository at this point in the history
Replace 'YYYY' with 'yyyy'.

fixes 1088
  • Loading branch information
jbaiera committed Jan 9, 2018
1 parent 8dfc768 commit eaab5e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/src/reference/asciidoc/appendix/breaking.adoc
Expand Up @@ -28,10 +28,10 @@ tests were migrated to using single types where possible. This migration
unearthed a problem with Pig and Cascading in regards to how those frameworks
interact with the provided index/type names. During setup, Pig and Cascading
attempt to parse these index names as paths, and when the index has a formatted
pattern in it (like `index-{event:YYYY.MM.dd}/type`) the path parsing breaks.
pattern in it (like `index-{event:yyyy.MM.dd}/type`) the path parsing breaks.
Going forward, the colon character `:` that delimits the field name from the
format will be changed to the pipe character `|`. An example of the new patterned
index names is `index-{event|YYYY.MM.dd}/type`. 5.x will support both separators,
index names is `index-{event|yyyy.MM.dd}/type`. 5.x will support both separators,
but will log a deprecation message when a colon `:` is encountered.

==== TTL and Timestamp Meta-fields
Expand Down
6 changes: 3 additions & 3 deletions docs/src/reference/asciidoc/core/configuration.adoc
Expand Up @@ -85,14 +85,14 @@ For example assuming the data contains a +@timestamp+ field, one can group the d
[source,ini]
----
# index the documents based on their date
es.resource.write = my-collection/{@timestamp:YYYY.MM.dd} <1>
es.resource.write = my-collection/{@timestamp:yyyy.MM.dd} <1>
----

<1> +@timestamp+ field formatting - in this case +YYYY.MM.dd+
<1> +@timestamp+ field formatting - in this case +yyyy.MM.dd+

The same configuration property is used (+es.resource.write+) however, through the special +:+ characters a formatting pattern is specified.
Please refer to the http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html[SimpleDateFormat] javadocs for more information on the syntax supported.
In this case +YYYY.MM.dd+ translates the date into the year (specified by four digits), month by 2 digits followed by the day by two digits (such as +2015.01.28+).
In this case +yyyy.MM.dd+ translates the date into the year (specified by four digits), month by 2 digits followed by the day by two digits (such as +2015.01.28+).

http://logstash.net/[Logstash] users will find this _pattern_ quite http://logstash.net/docs/latest/filters/date[familiar].

Expand Down

0 comments on commit eaab5e8

Please sign in to comment.