Index pipeline stage configuration specifications
test
these values will be added as fields tz.test
, tz_offset.test
, and epoch.test
.
The option splitLocal
splits the timestamp in its original timezone, while the option splitUTC
first converts the timestamp to UTC and then splits it. The resulting date and time components are stored in fields that follow patterns <part>.local.<fieldName>
and <part>.utc.<fieldName>
respectively.
The following parts are extracted and added to the document:
2015-01-01 00:00:00.000 Europe/Warsaw
in a field test
, the corresponding normalized UTC timestamp will be 2014-12-31T23:00:00.00Z
.
splitLocal
parsingsplitLocal
parsing to the contents a field named test
which contains the value 2015-01-01 00:00:00.000 Europe/Warsaw
:
Field name | value |
---|---|
tz.test | Europe/Warsaw |
tz_offset.test | +01:00 |
epoch.test | 1420066800000 |
splitUTC
parsingsplitUTC
parsing to the contents a field named test
which contains the value 2015-01-01 00:00:00.000 Europe/Warsaw
:
Field name | value |
---|---|
tz.test | Europe/Warsaw |
tz_offset.test | +01:00 |
epoch.test | 1420066800000 |
year.utc.test | 2014 |
year.local.test | 2015 |
month.utc.test | 12 |
month.local.test | 1 |
day.utc.test | 31 |
day.local.test | 1 |
yday.utc.test | 365 |
yday.local.test | 1 |
weekday.utc.test | 3 |
weekday.local.test | 4 |
week.utc.test | 1 |
week.local.test | 1 |
weekyear.utc.test | 2015 |
weekyear.local.test | 2015 |
hour.utc.test | 23 |
hour.local.test | 0 |
min.utc.test | 0 |
min.local.test | 0 |
sec.utc.test | 0 |
sec.local.test | 0 |
ms.utc.test | 0 |
ms.local.test | 0 |
Pattern | Notes |
---|---|
EEE yyyy-MM-dd HH:mm:ss.SSS zzz | |
yyyy-MM-dd’T’HH:mm:ss.SSSZ | With numeric +-HHmm timezone at the end |
yyyy-MM-dd’T’HH:mm:ss.SSSZZ | With numeric +-HH:mm timezone at the end |
yyyy-MM-dd’T’HH:mm:ss.SSSz | With symbolic XXX timezone at the end |
yyyy-MM-dd’T’HH:mm:ssz | With symbolic XXX timezone at the end |
yyyy-MM-dd’T’HH:mm:ssZ | With offset |
EEE MMM d HH:mm:ss z yyyy | |
EEE MMM d HH:mm:ss Z yyyy | |
EEE MMM d HH:mm:ss z yyyy | |
EEE MMM d HH:mm:ss.SSS z yyyy | |
EEE, dd MMM yyyy HH:mm:ss zzz | |
EEEE, dd-MMM-yy HH:mm:ss zzz | |
yyyy-MM-dd HH:mm:ss Z | |
yyyy-MM-dd HH:mm:ss ZZ | |
yyyy-MM-dd HH:mm:ss z | |
yyyy-MM-dd HH:mm:ss.SSS Z | |
yyyy-MM-dd HH:mm:ss.SSS ZZ | |
yyyy-MM-dd HH:mm:ss.SSS z | |
yyyy-MM-dd HH:mm:ss zzz | With full time zone (e.g. America/New_York) |
yyyy-MM-dd’T’HH:mm:ss’GMT’Z | With literal “GMT” and offset |
yyyy-MM-dd’T’HH:mm:ss.SSS’GMT’Z | With literal “GMT” and offset |
yyyy-MM-dd’T’HH:mm:ss’UTC’Z | With literal “UTC” and offset |
yyyy-MM-dd’T’HH:mm:ss.SSS’UTC’Z | With literal “UTC” and offset |
yyyy-MM-dd HH:mm:ss 'UTC’Z | |
yyyy-MM-dd HH:mm:ss.SSS 'UTC’Z | |
yyyy-MM-dd HH:mm:ss 'GMT’Z | |
yyyy-MM-dd HH:mm:ss.SSS 'GMT’Z | |
dd-MM-yyyy HH:mm:ss zzz |
Symbol | Meaning | Example |
---|---|---|
G | era | AD |
C | century of era (>=0) | 20 |
Y | year of era (>=0) | 1996 |
x | weekyear | 1996 |
w | week of weekyear | 27 |
e | day of week | 2 |
E | day of week | Tuesday Tue |
y | year | 1996 |
D | day of year | 189 |
M | month of year | July Jul 07 |
d | day of month | 10 |
a | halfday of day | PM |
K | hour of halfday (0~11) | 0 |
h | clockhour of halfday (1~12) | 12 |
H | hour of day (0~23) | 0 |
k | clockhour of day (1~24) | 24 |
m | minute of hour | 30 |
s | second of minute | 55 |
S | fraction of second | 978 |
z | time zone | Pacific Standard Time ; PST |
Z | time zone offset/id | -0800 -08:00 America/Los_Angeles |
' | escape for text | |
'' | single quote | ' |
EEEE
would output Tuesday
, while E
outputs Mon
.
For numeric outputs, the amount of symbols used is the same as the minimum digits used for representation.
If the number is smaller, then it will be padded with zeroes. HH
would be 09
, while H
is 9
.
For the year, the representation for year and weekyear is different. For example, if the count of y
is two, the year would be the two digit, zero-based year of the century.
For the month, if there are three or more symbols, then the text is used. For example, MM
would output 03
, MMM
outputs Mar
, and MMMM
outputs March
.
For the zone, Z
outputs the offset without a colon, ZZ
outputs the offset with a colon, and ZZZ
or more outputs the zone id.
For the zone name, time zone names 'z'
cannot be parsed.
Any characters in the imput that are not in the range of ['a'…'z']
and ['A'…'Z']
will be treated like quoted text. So, characters like ','
or '-'
will appear in the output time text even if they are not wrapped in single quotes.
A new configuration can be made using a combination of the symbols and regular characters. For example, the pattern E MM/dd/yyyy HH:mm:ss.SSS
would output the formatted date Mon 01/16/2017 10:53:32.939
.
\t
for the tab character. When entering configuration values in the API, use escaped characters, such as \\t
for the tab character.