Skip to content

Commit

Permalink
Merge branch 'master' into repository-encrypted-client-side-reformated
Browse files Browse the repository at this point in the history
  • Loading branch information
albertzaharovits committed Dec 2, 2020
2 parents 652a51e + 01c343f commit 3c412e6
Showing 106 changed files with 3,590 additions and 522 deletions.
15 changes: 12 additions & 3 deletions .ci/packer_cache.sh
Original file line number Diff line number Diff line change
@@ -16,12 +16,21 @@ while [ -h "$SCRIPT" ] ; do
done

source $(dirname "${SCRIPT}")/java-versions.properties
export JAVA_HOME="${HOME}"/.java/${ES_BUILD_JAVA}
# We are caching BWC versions too, need these so we can build those
## We are caching BWC versions too, need these so we can build those
export JAVA8_HOME="${HOME}"/.java/java8
export JAVA11_HOME="${HOME}"/.java/java11
export JAVA12_HOME="${HOME}"/.java/openjdk12
export JAVA13_HOME="${HOME}"/.java/openjdk13
export JAVA14_HOME="${HOME}"/.java/openjdk14
./gradlew --parallel clean -s resolveAllDependencies

## 6.8 branch is not referenced from any bwc project in master so we need to
## resolve its dependencies explicitly
rm -rf checkout/6.8
git clone --reference $(dirname "${SCRIPT}")/../.git https://github.com/elastic/elasticsearch.git --branch 6.8 --single-branch checkout/6.8
export JAVA_HOME="${JAVA11_HOME}"
./checkout/6.8/gradlew --project-dir ./checkout/6.8 --parallel clean --scan -Porg.elasticsearch.acceptScanTOS=true --stacktrace resolveAllDependencies
rm -rf ./checkout/6.8
## Gradle is able to resolve dependencies resolved with earlier gradle versions
## therefore we run master _AFTER_ we run 6.8 which uses an earlier gradle version
export JAVA_HOME="${HOME}"/.java/${ES_BUILD_JAVA}
./gradlew --parallel clean -s resolveAllDependencies
Original file line number Diff line number Diff line change
@@ -2828,6 +2828,7 @@ public void testUpdateModelSnapshot() throws Exception {
getModelSnapshotsResponse2.snapshots().get(0).getDescription());
}

@AwaitsFix(bugUrl="https://github.com/elastic/elasticsearch/issues/65699")
public void testUpgradeJobSnapshot() throws Exception {
String jobId = "test-upgrade-model-snapshot";
String snapshotId = "1541587919";
Original file line number Diff line number Diff line change
@@ -2336,6 +2336,7 @@ public void onFailure(Exception e) {
}
}

@AwaitsFix(bugUrl="https://github.com/elastic/elasticsearch/issues/65699")
public void testUpgradeJobSnapshot() throws IOException, InterruptedException {
RestHighLevelClient client = highLevelClient();

@@ -2366,13 +2367,14 @@ public void testUpgradeJobSnapshot() throws IOException, InterruptedException {
jobId, // <1>
snapshotId, // <2>
TimeValue.timeValueMinutes(30), // <3>
false); // <4>
true); // <4>
// end::upgrade-job-model-snapshot-request

try {
// tag::upgrade-job-model-snapshot-execute
UpgradeJobModelSnapshotResponse response = client.machineLearning().upgradeJobSnapshot(request, RequestOptions.DEFAULT);
// end::upgrade-job-model-snapshot-execute
fail("upgrade model snapshot should not have succeeded.");
} catch (ElasticsearchException ex) {
assertThat(ex.getMessage(), containsString("Expected persisted state but no state exists"));
}
@@ -2384,7 +2386,7 @@ public void testUpgradeJobSnapshot() throws IOException, InterruptedException {
// end::upgrade-job-model-snapshot-response
}
{
UpgradeJobModelSnapshotRequest request = new UpgradeJobModelSnapshotRequest(jobId, snapshotId, null, false);
UpgradeJobModelSnapshotRequest request = new UpgradeJobModelSnapshotRequest(jobId, snapshotId, null, true);

// tag::upgrade-job-model-snapshot-execute-listener
ActionListener<UpgradeJobModelSnapshotResponse> listener =
4 changes: 0 additions & 4 deletions docs/reference/eql/functions.asciidoc
Original file line number Diff line number Diff line change
@@ -1015,10 +1015,6 @@ expressions. Matching is case-sensitive.
*Example*
[source,eql]
----
// The two following expressions are equivalent.
process.name == "*regsvr32*" or process.name == "*explorer*"
wildcard(process.name, "*regsvr32*", "*explorer*")
// process.name = "regsvr32.exe"
wildcard(process.name, "*regsvr32*") // returns true
wildcard(process.name, "*regsvr32*", "*explorer*") // returns true
20 changes: 10 additions & 10 deletions docs/reference/eql/syntax.asciidoc
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ field using the `event_category_field` parameter of the EQL search API.

[discrete]
[[eql-syntax-match-any-event-category]]
==== Match any event category
=== Match any event category

To match events of any category, use the `any` keyword. You can also use the
`any` keyword to search for documents without a event category field.
@@ -53,7 +53,7 @@ any where network.protocol == "http"

[discrete]
[[eql-syntax-escape-an-event-category]]
==== Escape an event category
=== Escape an event category

Use enclosing double quotes (`"`) or three enclosing double quotes (`"""`) to
escape event categories that:
@@ -77,7 +77,7 @@ escape event categories that:

[discrete]
[[eql-syntax-escape-a-field-name]]
==== Escape a field name
=== Escape a field name

Use enclosing enclosing backticks (+++`+++) to escape field names that:

@@ -110,7 +110,7 @@ EQL operators are case-sensitive by default.

[discrete]
[[eql-syntax-comparison-operators]]
==== Comparison operators
=== Comparison operators

[source,eql]
----
@@ -197,7 +197,7 @@ process where process.parent.name == "foo" and process.name == "foo"

[discrete]
[[eql-syntax-logical-operators]]
==== Logical operators
=== Logical operators

[source,eql]
----
@@ -217,7 +217,7 @@ Returns `true` if the condition to the right is `false`.

[discrete]
[[eql-syntax-lookup-operators]]
==== Lookup operators
=== Lookup operators

[source,eql]
----
@@ -240,7 +240,7 @@ to compare strings.

[discrete]
[[eql-syntax-math-operators]]
==== Math operators
=== Math operators

[source,eql]
----
@@ -334,7 +334,7 @@ Strings enclosed in single quotes (`'`) are not supported.

[discrete]
[[eql-syntax-escape-characters]]
==== Escape characters in a string
=== Escape characters in a string

When used within a string, special characters, such as a carriage return or
double quote (`"`), must be escaped with a preceding backslash (`\`).
@@ -360,7 +360,7 @@ double quote (`\"`) instead.

[discrete]
[[eql-syntax-raw-strings]]
==== Raw strings
=== Raw strings

Raw strings treat special characters, such as backslashes (`\`), as literal
characters. Raw strings are enclosed in three double quotes (`"""`).
@@ -380,7 +380,7 @@ use a regular string with the `\"` escape sequence.

[discrete]
[[eql-syntax-wildcards]]
==== Wildcards
=== Wildcards

For string comparisons using the `:` operator, you can use wildcards (`*`) to
match specific patterns:
13 changes: 13 additions & 0 deletions docs/reference/glossary.asciidoc
Original file line number Diff line number Diff line change
@@ -447,6 +447,17 @@ See the {ref}/indices-rollover-index.html[rollover index API].
// end::rollover-def[]
--

ifdef::permanently-unreleased-branch[]

[[glossary-rollup]] rollup ::
// tag::rollup-def[]
Aggregates an index's time series data and stores the results in another index.
For example, you can roll up hourly data into daily or weekly summaries.
// end::rollup-def[]

endif::[]
ifndef::permanently-unreleased-branch[]

[[glossary-rollup]] rollup ::
// tag::rollup-def[]
Summarize high-granularity data into a more compressed format to
@@ -466,6 +477,8 @@ index the summaries into a separate rollup index.
The job configuration controls what information is rolled up and how often.
// end::rollup-job-def[]

endif::[]

[[glossary-routing]] routing ::
+
--
2 changes: 1 addition & 1 deletion docs/reference/mapping/fields/doc-count-field.asciidoc
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ PUT my_index/_doc/2
"values" : [0.1, 0.25, 0.35, 0.4, 0.45, 0.5],
"counts" : [8, 17, 8, 7, 6, 2]
},
"_doc_count_": 62 <1>
"_doc_count": 62 <1>
}
--------------------------------------------------
<1> Field `_doc_count` must be a positive integer storing the number of documents aggregated to produce each histogram.
18 changes: 18 additions & 0 deletions docs/reference/migration/migrate_8_0/search.asciidoc
Original file line number Diff line number Diff line change
@@ -157,3 +157,21 @@ Change any use of `-1` as `from` parameter in request body or url parameters by
setting it to `0` or omitting it entirely. Requests containing negative values will
return an error.
====

.Range queries on date fields treat numeric values alwas as milliseconds-since-epoch.
[%collapsible]
====
*Details* +
Range queries on date fields used to misinterpret small numbers (e.g. four digits like 1000)
as a year when no additional format was set, but would interpret other numeric values as
milliseconds since epoch. We now treat all numeric values in absence of a specific `format`
parameter as milliseconds since epoch. If you want to query for years instead, with a missing
`format` you now need to quote the input value (e.g. "1984").
*Impact* +
If you query date fields without a specified `format`, check if the values in your queries are
actually meant to be milliseconds-since-epoch and use a numeric value in this case. If not, use
a string value which gets parsed by either the date format set on the field in the mappings or
by `strict_date_optional_time` by default.
====
8 changes: 8 additions & 0 deletions docs/reference/query-dsl/range-query.asciidoc
Original file line number Diff line number Diff line change
@@ -183,6 +183,14 @@ to `2099-12-01T23:59:59.999_999_999Z`. This date uses the provided year (`2099`)
and month (`12`) but uses the default day (`01`), hour (`23`), minute (`59`),
second (`59`), and nanosecond (`999_999_999`).

[[numeric-date]]
====== Numeric date range value

When no date format is specified and the range query is targeting a date field, numeric
values are interpreted representing milliseconds-since-the-epoch. If you want the value
to represent a year, e.g. 2020, you need to pass it as a String value (e.g. "2020") that
will be parsed according to the default format or the set format.

[[range-query-date-math-rounding]]
====== Date math and rounding
{es} rounds <<date-math,date math>> values in parameters as follows:
3 changes: 2 additions & 1 deletion docs/reference/release-notes/8.0.0-alpha1.asciidoc
Original file line number Diff line number Diff line change
@@ -29,5 +29,6 @@ by using appropriate thresholds. If for instance we want to simulate `index.inde
all we need to do is to set `index.indexing.slowlog.threshold.index.debug` and
`index.indexing.slowlog.threshold.index.trace` to `-1` {es-pull}57591[#57591]


Search::
* Consistent treatment of numeric values for range query on date fields without `format` {es-pull}[#63692]

20 changes: 20 additions & 0 deletions docs/reference/rollup/apis/delete-job.asciidoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
ifdef::permanently-unreleased-branch[]

[role="xpack"]
[testenv="basic"]
[[rollup-delete-job]]
=== Delete legacy {rollup-jobs} API
[subs="attributes"]
++++
<titleabbrev>Delete legacy {rollup-jobs}</titleabbrev>
++++

include::put-job.asciidoc[tag=legacy-rollup-admon]

Deletes a legacy {rollup-job}.

endif::[]
ifndef::permanently-unreleased-branch[]

[role="xpack"]
[testenv="basic"]
[[rollup-delete-job]]
@@ -11,6 +29,8 @@ Deletes an existing {rollup-job}.

experimental[]

endif::[]

[[rollup-delete-job-request]]
==== {api-request-title}

19 changes: 19 additions & 0 deletions docs/reference/rollup/apis/get-job.asciidoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
ifdef::permanently-unreleased-branch[]

[role="xpack"]
[testenv="basic"]
[[rollup-get-job]]
=== Get legacy {rollup-jobs} API
++++
<titleabbrev>Get legacy job</titleabbrev>
++++

include::put-job.asciidoc[tag=legacy-rollup-admon]

Gets the configuration, stats, and status of legacy {rollup-jobs}.

endif::[]
ifndef::permanently-unreleased-branch[]

[role="xpack"]
[testenv="basic"]
[[rollup-get-job]]
@@ -10,6 +27,8 @@ Retrieves the configuration, stats, and status of {rollup-jobs}.

experimental[]

endif::[]

[[rollup-get-job-request]]
==== {api-request-title}

24 changes: 24 additions & 0 deletions docs/reference/rollup/apis/put-job.asciidoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
ifdef::permanently-unreleased-branch[]

[role="xpack"]
[testenv="basic"]
[[rollup-put-job]]
=== Create legacy {rollup-jobs} API
[subs="attributes"]
++++
<titleabbrev>Create legacy {rollup-jobs}</titleabbrev>
++++

// tag::legacy-rollup-admon[]
WARNING: This documentation is about legacy rollups. Legacy rollups are
deprecated and will be replaced by new rollup functionality introduced in {es}
7.x.
// end::legacy-rollup-admon[]

Creates a legacy {rollup-job}.

endif::[]
ifndef::permanently-unreleased-branch[]

[role="xpack"]
[testenv="basic"]
[[rollup-put-job]]
@@ -11,6 +33,8 @@ Creates a {rollup-job}.

experimental[]

endif::[]

[[rollup-put-job-api-request]]
==== {api-request-title}

19 changes: 19 additions & 0 deletions docs/reference/rollup/apis/rollup-caps.asciidoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
ifdef::permanently-unreleased-branch[]

[role="xpack"]
[testenv="basic"]
[[rollup-get-rollup-caps]]
=== Get legacy {rollup-job} capabilities API
++++
<titleabbrev>Get legacy rollup caps</titleabbrev>
++++

include::put-job.asciidoc[tag=legacy-rollup-admon]

Returns the capabilities of legacy {rollup-jobs} for an index pattern.

endif::[]
ifndef::permanently-unreleased-branch[]

[role="xpack"]
[testenv="basic"]
[[rollup-get-rollup-caps]]
@@ -11,6 +28,8 @@ specific index or index pattern.

experimental[]

endif::[]

[[rollup-get-rollup-caps-request]]
==== {api-request-title}

Loading

0 comments on commit 3c412e6

Please sign in to comment.