Skip to content

Commit 4be6b0e

Browse files
committed
Merge branch 'master' into ccr
* master: [ML] Fix master node deadlock during ML daily maintenance (#31836) Build: Switch integ-test-zip to OSS-only (#31866) SQL: Remove restriction for single column grouping (#31818) Build: Fix detection of Eclipse Compiler Server (#31838) Docs: Inconsistency between description and example (#31858) Re-enable bwc tests now that #29538 has been backported and 6.x intake build succeeded. QA: build improvements related to SQL projects (#31862) [Docs] Add clarification to analysis example (#31826) Check timeZone() argument in AbstractSqlQueryRequest (#31822) SQL: Fix incorrect HAVING equality (#31820) Smaller aesthetic fixes to InternalTestCluster (#31831) [Docs] Clarify accepted sort case (#31605) Temporarily disable bwc test in order to backport #29538 Remove obsolete parameters from analyze rest spec (#31795) [Docs] Fix wrong link in Korean analyzer docs (#31815) Fix profiling of ordered terms aggs (#31814) Properly mute test involving JDK11 closes #31739 Do not return all indices if a specific alias is requested via get aliases api. (#29538) Get snapshot rest client cleanups (#31740) Docs: Explain _bulk?refresh shard targeting Fix handling of points_only with term strategy in geo_shape (#31766)
2 parents 6dd3434 + 49ba271 commit 4be6b0e

File tree

47 files changed

+632
-213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+632
-213
lines changed

build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ Map<String, String> buildMetadataMap = buildMetadataValue.tokenize(';').collectE
125125
allprojects {
126126
project.ext {
127127
// for ide hacks...
128-
isEclipse = System.getProperty("eclipse.launcher") != null || gradle.startParameter.taskNames.contains('eclipse') || gradle.startParameter.taskNames.contains('cleanEclipse')
128+
isEclipse = System.getProperty("eclipse.launcher") != null || // Detects gradle launched from Eclipse's IDE
129+
System.getProperty("eclipse.application") != null || // Detects gradle launched from the Eclipse compiler server
130+
gradle.startParameter.taskNames.contains('eclipse') || // Detects gradle launched from the command line to do eclipse stuff
131+
gradle.startParameter.taskNames.contains('cleanEclipse')
129132
isIdea = System.getProperty("idea.active") != null || gradle.startParameter.taskNames.contains('idea') || gradle.startParameter.taskNames.contains('cleanIdea')
130133

131134
// for BWC testing
@@ -446,7 +449,7 @@ allprojects {
446449

447450
File licenseHeaderFile;
448451
String prefix = ':x-pack';
449-
452+
450453
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
451454
prefix = prefix.replace(':', '_')
452455
}
@@ -455,7 +458,7 @@ allprojects {
455458
} else {
456459
licenseHeaderFile = new File(project.rootDir, 'buildSrc/src/main/resources/license-headers/oss-license-header.txt')
457460
}
458-
461+
459462
String lineSeparator = Os.isFamily(Os.FAMILY_WINDOWS) ? '\\\\r\\\\n' : '\\\\n'
460463
String licenseHeader = licenseHeaderFile.getText('UTF-8').replace(System.lineSeparator(), lineSeparator)
461464
task copyEclipseSettings(type: Copy) {

client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,13 +2122,21 @@ public void testGetSnapshots() {
21222122
getSnapshotsRequest.snapshots(Arrays.asList(snapshot1, snapshot2).toArray(new String[0]));
21232123
setRandomMasterTimeout(getSnapshotsRequest, expectedParams);
21242124

2125-
boolean ignoreUnavailable = randomBoolean();
2126-
getSnapshotsRequest.ignoreUnavailable(ignoreUnavailable);
2127-
expectedParams.put("ignore_unavailable", Boolean.toString(ignoreUnavailable));
2125+
if (randomBoolean()) {
2126+
boolean ignoreUnavailable = randomBoolean();
2127+
getSnapshotsRequest.ignoreUnavailable(ignoreUnavailable);
2128+
expectedParams.put("ignore_unavailable", Boolean.toString(ignoreUnavailable));
2129+
} else {
2130+
expectedParams.put("ignore_unavailable", Boolean.FALSE.toString());
2131+
}
21282132

2129-
boolean verbose = randomBoolean();
2130-
getSnapshotsRequest.verbose(verbose);
2131-
expectedParams.put("verbose", Boolean.toString(verbose));
2133+
if (randomBoolean()) {
2134+
boolean verbose = randomBoolean();
2135+
getSnapshotsRequest.verbose(verbose);
2136+
expectedParams.put("verbose", Boolean.toString(verbose));
2137+
} else {
2138+
expectedParams.put("verbose", Boolean.TRUE.toString());
2139+
}
21322140

21332141
Request request = RequestConverters.getSnapshots(getSnapshotsRequest);
21342142
assertThat(endpoint, equalTo(request.getEndpoint()));

client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SnapshotClientDocumentationIT.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@
4848
import org.elasticsearch.common.xcontent.XContentType;
4949
import org.elasticsearch.repositories.fs.FsRepository;
5050
import org.elasticsearch.rest.RestStatus;
51+
import org.elasticsearch.snapshots.SnapshotId;
5152
import org.elasticsearch.snapshots.SnapshotInfo;
53+
import org.elasticsearch.snapshots.SnapshotShardFailure;
54+
import org.elasticsearch.snapshots.SnapshotState;
5255

5356
import java.io.IOException;
5457
import java.util.HashMap;
@@ -496,7 +499,14 @@ public void testSnapshotGetSnapshots() throws IOException {
496499
// end::get-snapshots-execute
497500

498501
// tag::get-snapshots-response
499-
List<SnapshotInfo> snapshotsInfos = response.getSnapshots(); // <1>
502+
List<SnapshotInfo> snapshotsInfos = response.getSnapshots();
503+
SnapshotInfo snapshotInfo = snapshotsInfos.get(0);
504+
RestStatus restStatus = snapshotInfo.status(); // <1>
505+
SnapshotId snapshotId = snapshotInfo.snapshotId(); // <2>
506+
SnapshotState snapshotState = snapshotInfo.state(); // <3>
507+
List<SnapshotShardFailure> snapshotShardFailures = snapshotInfo.shardFailures(); // <4>
508+
long startTime = snapshotInfo.startTime(); // <5>
509+
long endTime = snapshotInfo.endTime(); // <6>
500510
// end::get-snapshots-response
501511
assertEquals(1, snapshotsInfos.size());
502512
}

distribution/archives/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Closure commonZipConfig = {
102102

103103
task buildIntegTestZip(type: Zip) {
104104
configure(commonZipConfig)
105-
with archiveFiles(transportModulesFiles, 'zip', false)
105+
with archiveFiles(transportModulesFiles, 'zip', true)
106106
}
107107

108108
task buildZip(type: Zip) {
@@ -193,7 +193,7 @@ subprojects {
193193
onlyIf toolExists
194194
doLast {
195195
final String licenseFilename
196-
if (project.name.contains('oss-')) {
196+
if (project.name.contains('oss-') || project.name == 'integ-test-zip') {
197197
licenseFilename = "APACHE-LICENSE-2.0.txt"
198198
} else {
199199
licenseFilename = "ELASTIC-LICENSE.txt"

docs/java-rest/high-level/indices/analyze.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ You can analyze text using the mappings for a particular field in an index:
5656
include-tagged::{doc-tests}/IndicesClientDocumentationIT.java[analyze-field-request]
5757
---------------------------------------------------
5858

59-
==== Optional arguemnts
59+
==== Optional arguments
6060
The following arguments can also optionally be provided:
6161

6262
["source","java",subs="attributes,callouts,macros"]

docs/java-rest/high-level/snapshot/get_snapshots.asciidoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,16 @@ argument.
9393
[[java-rest-high-snapshot-get-snapshots-response]]
9494
==== Get Snapshots Response
9595

96-
Use the `GetSnapshotsResponse` to retrieve information about the evaluated
97-
request:
96+
The returned `GetSnapshotsResponse` allows the retrieval of information about the requested
97+
snapshots:
9898

9999
["source","java",subs="attributes,callouts,macros"]
100100
--------------------------------------------------
101101
include-tagged::{doc-tests}/SnapshotClientDocumentationIT.java[get-snapshots-response]
102102
--------------------------------------------------
103-
<1> Indicates the node has started the request.
103+
<1> The REST status of a snapshot
104+
<2> The snapshot id
105+
<3> The current state of the snapshot
106+
<4> Information about failures that occurred during the shard snapshot process.
107+
<5> The snapshot start time
108+
<6> The snapshot end time

docs/plugins/analysis-nori.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Which responds with:
268268

269269
The `nori_part_of_speech` token filter removes tokens that match a set of
270270
part-of-speech tags. The list of supported tags and their meanings can be found here:
271-
{lucene_version_path}/org/apache/lucene/analysis/ko/POS.Tag.html[Part of speech tags]
271+
{lucene-core-javadoc}/../analyzers-nori/org/apache/lucene/analysis/ko/POS.Tag.html[Part of speech tags]
272272

273273
It accepts the following setting:
274274

docs/reference/analysis.asciidoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@ defined per index.
1313
[float]
1414
== Index time analysis
1515

16-
For instance at index time, the built-in <<english-analyzer,`english`>> _analyzer_ would
17-
convert this sentence:
16+
For instance, at index time the built-in <<english-analyzer,`english`>> _analyzer_
17+
will first convert the sentence:
1818

1919
[source,text]
2020
------
2121
"The QUICK brown foxes jumped over the lazy dog!"
2222
------
2323

24-
into these terms, which would be added to the inverted index.
24+
into distinct tokens. It will then lowercase each token, remove frequent
25+
stopwords ("the") and reduce the terms to their word stems (foxes -> fox,
26+
jumped -> jump, lazy -> lazi). In the end, the following terms will be added
27+
to the inverted index:
2528

2629
[source,text]
2730
------

docs/reference/docs/bulk.asciidoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@ example.
230230
Control when the changes made by this request are visible to search. See
231231
<<docs-refresh,refresh>>.
232232

233+
NOTE: Only the shards that receive the bulk request will be affected by
234+
`refresh`. Imagine a `_bulk?refresh=wait_for` request with three
235+
documents in it that happen to be routed to different shards in an index
236+
with five shards. The request will only wait for those three shards to
237+
refresh. The other two shards of that make up the index do not
238+
participate in the `_bulk` request at all.
239+
233240
[float]
234241
[[bulk-update]]
235242
=== Update

docs/reference/indices/aliases.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ The rest endpoint is: `/{index}/_alias/{alias}`.
486486
[float]
487487
==== Examples:
488488

489-
All aliases for the index users:
489+
All aliases for the index `logs_20162801`:
490490

491491
[source,js]
492492
--------------------------------------------------

0 commit comments

Comments
 (0)