Skip to content

Commit

Permalink
Merge remote-tracking branch 'elastic/master' into retention-lease-ccr
Browse files Browse the repository at this point in the history
* elastic/master:
  Remove immediate operation retry after mapping update (elastic#38873)
  Remove mentioning of types from bulk API docs (elastic#38896)
  SQL: change JDBC setup URL in the documentation (elastic#38564)
  Skip BWC tests in checkPart1 and checkPart2 (elastic#38730)
  Enable silent FollowersCheckerTest (elastic#38851)
  Update TESTING.asciidoc with platform specific instructions (elastic#38802)
  Use consistent view of realms for authentication (elastic#38815)
  Stabilize RareClusterState (elastic#38671)
  Increase Timeout in UnicastZenPingTests (elastic#38893)
  Do not recommend installing vagrant-winrm elastic#38887
  _cat/indices with Security, hide names when wildcard (elastic#38824)
  SQL: fall back to using the field name for column label (elastic#38842)
  Fix LocalIndexFollowingIT#testRemoveRemoteConnection() test (elastic#38709)
  Remove joda time mentions in documentation (elastic#38720)
  Add enabled status for token and api key service (elastic#38687)
  • Loading branch information
jasontedor committed Feb 14, 2019
2 parents 0dcf6c9 + 2a03802 commit b8b2537
Show file tree
Hide file tree
Showing 41 changed files with 892 additions and 248 deletions.
15 changes: 9 additions & 6 deletions TESTING.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ following:
./gradlew assemble
-----------------------------

To create a platform-specific build including the x-pack modules, use the
following depending on your operating system:

-----------------------------
./gradlew :distribution:archives:linux-tar:assemble --parallel
./gradlew :distribution:archives:darwin-tar:assemble --parallel
./gradlew :distribution:archives:windows-zip:assemble --parallel
-----------------------------

=== Running Elasticsearch from a checkout

In order to run Elasticsearch from source without building a package, you can
Expand Down Expand Up @@ -385,12 +394,6 @@ Unfortunately we're not able to provide boxes for them in open source use
because of licensing issues. Any Virtualbox image that has WinRM and Powershell
enabled for remote users should work.

Testing on Windows requires the https://github.com/criteo/vagrant-winrm[vagrant-winrm] plugin.

------------------------------------
vagrant plugin install vagrant-winrm
------------------------------------

Specify the image IDs of the Windows boxes to gradle with the following project
properties. They can be set in `~/.gradle/gradle.properties` like

Expand Down
17 changes: 15 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ task verifyVersions {
* the enabled state of every bwc task. It should be set back to true
* after the backport of the backcompat code is complete.
*/
final boolean bwc_tests_enabled = true
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */

boolean bwc_tests_enabled = false
final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/38687" /* place a PR link here when committing bwc changes */

if (bwc_tests_enabled == false) {
if (bwc_tests_disabled_issue.isEmpty()) {
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")
Expand All @@ -170,6 +172,17 @@ if (bwc_tests_enabled == false) {
println "See ${bwc_tests_disabled_issue}"
println "==========================================================="
}
if (project.gradle.startParameter.taskNames.find { it.startsWith("checkPart") } != null) {
// Disable BWC tests for checkPart* tasks as it's expected that this will run un it's own check
bwc_tests_enabled = false
}
if (project.gradle.startParameter.taskNames.contains("bwcTestSnapshots") && bwc_tests_enabled == false) {
throw new GradleException("BWC tests are disabled. " +
"This can happen if a branch happened to be created when they were disabled and can be solved by mergin at" +
"least to the commit on the parent branch that re-enabled them"
)
}

subprojects {
ext.bwc_tests_enabled = bwc_tests_enabled
}
Expand Down
190 changes: 135 additions & 55 deletions docs/reference/aggregations/bucket/daterange-aggregation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -110,68 +110,149 @@ bucket, as if they had a date value of "1899-12-31".
==== Date Format/Pattern

NOTE: this information was copied from
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html[JodaDate]
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html[DateTimeFormatter]

All ASCII letters are reserved as format pattern letters, which are defined
as follows:

[options="header"]
|=======
|Symbol |Meaning |Presentation |Examples
|G |era |text |AD
|C |century of era (>=0) |number |20
|Y |year of era (>=0) |year |1996

|x |weekyear |year |1996
|w |week of weekyear |number |27
|e |day of week |number |2
|E |day of week |text |Tuesday; Tue

|y |year |year |1996
|D |day of year |number |189
|M |month of year |month |July; Jul; 07
|d |day of month |number |10

|a |halfday of day |text |PM
|K |hour of halfday (0~11) |number |0
|h |clockhour of halfday (1~12) |number |12

|H |hour of day (0~23) |number |0
|k |clockhour of day (1~24) |number |24
|m |minute of hour |number |30
|s |second of minute |number |55
|S |fraction of second |number |978

|z |time zone |text |Pacific Standard Time; PST
|Z |time zone offset/id |zone |-0800; -08:00; America/Los_Angeles

|' |escape for text |delimiter
|'' |single quote |literal |'
|Symbol |Meaning |Presentation |Examples
|G |era |text |AD; Anno Domini; A
|u |year |year |2004; 04
|y |year-of-era |year |2004; 04
|D |day-of-year |number |189
|M/L |month-of-year |number/text |7; 07; Jul; July; J
|d |day-of-month |number |10

|Q/q |quarter-of-year |number/text |3; 03; Q3; 3rd quarter
|Y |week-based-year |year |1996; 96
|w |week-of-week-based-year |number |27
|W |week-of-month |number |4
|E |day-of-week |text |Tue; Tuesday; T
|e/c |localized day-of-week |number/text |2; 02; Tue; Tuesday; T
|F |week-of-month |number |3

|a |am-pm-of-day |text |PM
|h |clock-hour-of-am-pm (1-12) |number |12
|K |hour-of-am-pm (0-11) |number |0
|k |clock-hour-of-am-pm (1-24) |number |0

|H |hour-of-day (0-23) |number |0
|m |minute-of-hour |number |30
|s |second-of-minute |number |55
|S |fraction-of-second |fraction |978
|A |milli-of-day |number |1234
|n |nano-of-second |number |987654321
|N |nano-of-day |number |1234000000

|V |time-zone ID |zone-id |America/Los_Angeles; Z; -08:30
|z |time-zone name |zone-name |Pacific Standard Time; PST
|O |localized zone-offset |offset-O |GMT+8; GMT+08:00; UTC-08:00;
|X |zone-offset 'Z' for zero |offset-X |Z; -08; -0830; -08:30; -083015; -08:30:15;
|x |zone-offset |offset-x |+0000; -08; -0830; -08:30; -083015; -08:30:15;
|Z |zone-offset |offset-Z |+0000; -0800; -08:00;

|p |pad next |pad modifier |1
|' |escape for text |delimiter
|'' |single quote |literal |'
|[ |optional section start
|] |optional section end
|# |reserved for future use
|{ |reserved for future use
|} |reserved for future use
|=======

The count of pattern letters determine the format.
The count of pattern letters determines the format.

Text:: The text style is determined based on the number of pattern letters
used. Less than 4 pattern letters will use the short form. Exactly 4
pattern letters will use the full form. Exactly 5 pattern letters will use
the narrow form. Pattern letters `L`, `c`, and `q` specify the stand-alone
form of the text styles.

Number:: If the count of letters is one, then the value is output using
the minimum number of digits and without padding. Otherwise, the count of
digits is used as the width of the output field, with the value
zero-padded as necessary. The following pattern letters have constraints
on the count of letters. Only one letter of `c` and `F` can be specified.
Up to two letters of `d`, `H`, `h`, `K`, `k`, `m`, and `s` can be
specified. Up to three letters of `D` can be specified.

Number/Text:: If the count of pattern letters is 3 or greater, use the
Text rules above. Otherwise use the Number rules above.

Fraction:: Outputs the nano-of-second field as a fraction-of-second. The
nano-of-second value has nine digits, thus the count of pattern letters is
from 1 to 9. If it is less than 9, then the nano-of-second value is
truncated, with only the most significant digits being output.

Year:: The count of letters determines the minimum field width below which
padding is used. If the count of letters is two, then a reduced two digit
form is used. For printing, this outputs the rightmost two digits. For
parsing, this will parse using the base value of 2000, resulting in a year
within the range 2000 to 2099 inclusive. If the count of letters is less
than four (but not two), then the sign is only output for negative years
as per `SignStyle.NORMAL`. Otherwise, the sign is output if the pad width is
exceeded, as per `SignStyle.EXCEEDS_PAD`.

ZoneId:: This outputs the time-zone ID, such as `Europe/Paris`. If the
count of letters is two, then the time-zone ID is output. Any other count
of letters throws `IllegalArgumentException`.

Zone names:: This outputs the display name of the time-zone ID. If the
count of letters is one, two or three, then the short name is output. If
the count of letters is four, then the full name is output. Five or more
letters throws `IllegalArgumentException`.

Offset X and x:: This formats the offset based on the number of pattern
letters. One letter outputs just the hour, such as `+01`, unless the
minute is non-zero in which case the minute is also output, such as
`+0130`. Two letters outputs the hour and minute, without a colon, such as
`+0130`. Three letters outputs the hour and minute, with a colon, such as
`+01:30`. Four letters outputs the hour and minute and optional second,
without a colon, such as `+013015`. Five letters outputs the hour and
minute and optional second, with a colon, such as `+01:30:15`. Six or
more letters throws `IllegalArgumentException`. Pattern letter `X` (upper
case) will output `Z` when the offset to be output would be zero,
whereas pattern letter `x` (lower case) will output `+00`, `+0000`, or
`+00:00`.

Offset O:: This formats the localized offset based on the number of
pattern letters. One letter outputs the short form of the localized
offset, which is localized offset text, such as `GMT`, with hour without
leading zero, optional 2-digit minute and second if non-zero, and colon,
for example `GMT+8`. Four letters outputs the full form, which is
localized offset text, such as `GMT, with 2-digit hour and minute
field, optional second field if non-zero, and colon, for example
`GMT+08:00`. Any other count of letters throws
`IllegalArgumentException`.

Offset Z:: This formats the offset based on the number of pattern letters.
One, two or three letters outputs the hour and minute, without a colon,
such as `+0130`. The output will be `+0000` when the offset is zero.
Four letters outputs the full form of localized offset, equivalent to
four letters of Offset-O. The output will be the corresponding localized
offset text if the offset is zero. Five letters outputs the hour,
minute, with optional second if non-zero, with colon. It outputs `Z` if
the offset is zero. Six or more letters throws IllegalArgumentException.

Optional section:: The optional section markers work exactly like calling
`DateTimeFormatterBuilder.optionalStart()` and
`DateTimeFormatterBuilder.optionalEnd()`.

Pad modifier:: Modifies the pattern that immediately follows to be padded
with spaces. The pad width is determined by the number of pattern letters.
This is the same as calling `DateTimeFormatterBuilder.padNext(int)`.

For example, `ppH` outputs the hour-of-day padded on the left with spaces to a width of 2.

Any unrecognized letter is an error. Any non-letter character, other than
`[`, `]`, `{`, `}`, `#` and the single quote will be output directly.
Despite this, it is recommended to use single quotes around all characters
that you want to output directly to ensure that future changes do not
break your application.

Text:: If the number of pattern letters is 4 or more, the full form is used;
otherwise a short or abbreviated form is used if available.

Number:: The minimum number of digits. Shorter numbers are zero-padded to
this amount.

Year:: Numeric presentation for year and weekyear fields are handled
specially. For example, if the count of 'y' is 2, the year will be displayed
as the zero-based year of the century, which is two digits.

Month:: 3 or over, use text, otherwise use number.

Zone:: 'Z' outputs offset without a colon, 'ZZ' outputs the offset with a
colon, 'ZZZ' or more outputs the zone id.

Zone names:: Time zone names ('z') cannot be parsed.

Any characters in the pattern that are not in the ranges of ['a'..'z'] and
['A'..'Z'] will be treated as quoted text. For instance, characters like ':',
'.', ' ', '#' and '?' will appear in the resulting time text even they are
not embraced within single quotes.

[[time-zones]]
==== Time zone in date range aggregations
Expand All @@ -180,8 +261,7 @@ Dates can be converted from another time zone to UTC by specifying the
`time_zone` parameter.

Time zones may either be specified as an ISO 8601 UTC offset (e.g. +01:00 or
-08:00) or as one of the http://www.joda.org/joda-time/timezones.html [time
zone ids] from the TZ database.
-08:00) or as one of the time zone ids from the TZ database.

The `time_zone` parameter is also applied to rounding in date math expressions.
As an example, to round to the beginning of the day in the CET time zone, you
Expand Down
7 changes: 3 additions & 4 deletions docs/reference/docs/bulk.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The possible actions are `index`, `create`, `delete` and `update`.
`index` and `create` expect a source on the next
line, and have the same semantics as the `op_type` parameter to the
standard index API (i.e. create will fail if a document with the same
index and type exists already, whereas index will add or replace a
index exists already, whereas index will add or replace a
document as necessary). `delete` does not expect a source on the
following line, and has the same semantics as the standard delete API.
`update` expects that the partial doc, upsert and script and its options
Expand Down Expand Up @@ -172,9 +172,8 @@ The result of this bulk operation is:
// TESTRESPONSE[s/"_seq_no" : 3/"_seq_no" : $body.items.3.update._seq_no/]
// TESTRESPONSE[s/"_primary_term" : 4/"_primary_term" : $body.items.3.update._primary_term/]

The endpoints are `/_bulk`, `/{index}/_bulk`, and `{index}/{type}/_bulk`.
When the index or the index/type are provided, they will be used by
default on bulk items that don't provide them explicitly.
The endpoints are `/_bulk` and `/{index}/_bulk`. When the index is provided, it
will be used by default on bulk items that don't provide it explicitly.

A note on the format. The idea here is to make processing of this as
fast as possible. As some of the actions will be redirected to other
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ingest/processors/date-index-name.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ understands this to mean `2016-04-01` as is explained in the <<date-math-index-n
| `field` | yes | - | The field to get the date or timestamp from.
| `index_name_prefix` | no | - | A prefix of the index name to be prepended before the printed date. Supports <<accessing-template-fields,template snippets>>.
| `date_rounding` | yes | - | How to round the date when formatting the date into the index name. Valid values are: `y` (year), `M` (month), `w` (week), `d` (day), `h` (hour), `m` (minute) and `s` (second). Supports <<accessing-template-fields,template snippets>>.
| `date_formats` | no | yyyy-MM-dd'T'HH:mm:ss.SSSZ | An array of the expected date formats for parsing dates / timestamps in the document being preprocessed. Can be a Joda pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.
| `date_formats` | no | yyyy-MM-dd'T'HH:mm:ss.SSSZ | An array of the expected date formats for parsing dates / timestamps in the document being preprocessed. Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.
| `timezone` | no | UTC | The timezone to use when parsing the date and when date math index supports resolves expressions into concrete index names.
| `locale` | no | ENGLISH | The locale to use when parsing the date from the document being preprocessed, relevant when parsing month names or week days.
| `index_name_format` | no | yyyy-MM-dd | The format to be used when printing the parsed date into the index name. An valid Joda pattern is expected here. Supports <<accessing-template-fields,template snippets>>.
| `index_name_format` | no | yyyy-MM-dd | The format to be used when printing the parsed date into the index name. An valid java time pattern is expected here. Supports <<accessing-template-fields,template snippets>>.
include::common-options.asciidoc[]
|======
2 changes: 1 addition & 1 deletion docs/reference/ingest/processors/date.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in the same order they were defined as part of the processor definition.
| Name | Required | Default | Description
| `field` | yes | - | The field to get the date from.
| `target_field` | no | @timestamp | The field that will hold the parsed date.
| `formats` | yes | - | An array of the expected date formats. Can be a Joda pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.
| `formats` | yes | - | An array of the expected date formats. Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N.
| `timezone` | no | UTC | The timezone to use when parsing the date. Supports <<accessing-template-fields,template snippets>>.
| `locale` | no | ENGLISH | The locale to use when parsing the date, relevant when parsing month names or week days. Supports <<accessing-template-fields,template snippets>>.
include::common-options.asciidoc[]
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/mapping/params/format.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ down to the nearest day.
==== Custom date formats

Completely customizable date formats are supported. The syntax for these is explained
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html[in the Joda docs].
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html[DateTimeFormatter docs].

[[built-in-date-formats]]
==== Built In Formats
Expand Down Expand Up @@ -69,7 +69,6 @@ The following tables lists all the defaults ISO formats supported:

A generic ISO datetime parser where the date is mandatory and the time is
optional.
http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateOptionalTimeParser--[Full details here].

`basic_date`::

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/ml/apis/find-file-structure.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ format corresponds to the primary timestamp, but you do not want to specify the
full `grok_pattern`.

If this parameter is not specified, the structure finder chooses the best format from
the formats it knows, which are these Java time formats and their Joda equivalents:
the formats it knows, which are these Java time formats:

* `dd/MMM/yyyy:HH:mm:ss XX`
* `EEE MMM dd HH:mm zzz yyyy`
Expand Down
3 changes: 1 addition & 2 deletions docs/reference/query-dsl/query-string-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ both>>.
|`lenient` |If set to `true` will cause format based failures (like
providing text to a numeric field) to be ignored.

|`time_zone` | Time Zone to be applied to any range query related to dates. See also
http://www.joda.org/joda-time/apidocs/org/joda/time/DateTimeZone.html[JODA timezone].
|`time_zone` | Time Zone to be applied to any range query related to dates.

|`quote_field_suffix` | A suffix to append to fields for quoted parts of
the query string. This allows to use a field that has a different analysis chain
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/sql/endpoints/jdbc.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Once registered, the driver understands the following syntax as an URL:

["source","text",subs="attributes"]
----
jdbc:es://<1>[http|https]?<2>[host[:port]]*<3>/[prefix]*<4>[?[option=value]&<5>]*
jdbc:es://<1>[[http|https]://]*<2>[host[:port]]*<3>/[prefix]*<4>[?[option=value]&<5>]*
----

<1> `jdbc:es://` prefix. Mandatory.
Expand Down
Loading

0 comments on commit b8b2537

Please sign in to comment.