Skip to content

Commit dea0d59

Browse files
committed
Merge branch 'master' into 2018-10-22-cluster-coordination-docs
2 parents 0643929 + a7f344c commit dea0d59

File tree

211 files changed

+2902
-980
lines changed

Some content is hidden

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

211 files changed

+2902
-980
lines changed

buildSrc/src/main/resources/checkstyle_suppressions.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@
5656
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]rest[/\\]action[/\\]cat[/\\]RestIndicesAction.java" checks="LineLength" />
5757
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]rest[/\\]action[/\\]cat[/\\]RestShardsAction.java" checks="LineLength" />
5858
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]rest[/\\]action[/\\]cat[/\\]RestThreadPoolAction.java" checks="LineLength" />
59-
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]snapshots[/\\]RestoreService.java" checks="LineLength" />
60-
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]snapshots[/\\]SnapshotShardFailure.java" checks="LineLength" />
61-
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]snapshots[/\\]SnapshotShardsService.java" checks="LineLength" />
62-
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]snapshots[/\\]SnapshotsService.java" checks="LineLength" />
6359
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]threadpool[/\\]ThreadPool.java" checks="LineLength" />
6460
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]aliases[/\\]IndexAliasesIT.java" checks="LineLength" />
6561
<suppress files="server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]explain[/\\]ExplainActionIT.java" checks="LineLength" />

client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,16 @@ static Request multiGet(MultiGetRequest multiGetRequest) throws IOException {
299299

300300
static Request index(IndexRequest indexRequest) {
301301
String method = Strings.hasLength(indexRequest.id()) ? HttpPut.METHOD_NAME : HttpPost.METHOD_NAME;
302-
boolean isCreate = (indexRequest.opType() == DocWriteRequest.OpType.CREATE);
303-
String endpoint = endpoint(indexRequest.index(), indexRequest.type(), indexRequest.id(), isCreate ? "_create" : null);
302+
303+
String endpoint;
304+
if (indexRequest.opType() == DocWriteRequest.OpType.CREATE) {
305+
endpoint = indexRequest.type().equals(MapperService.SINGLE_MAPPING_NAME)
306+
? endpoint(indexRequest.index(), "_create", indexRequest.id())
307+
: endpoint(indexRequest.index(), indexRequest.type(), indexRequest.id(), "_create");
308+
} else {
309+
endpoint = endpoint(indexRequest.index(), indexRequest.type(), indexRequest.id());
310+
}
311+
304312
Request request = new Request(method, endpoint);
305313

306314
Params parameters = new Params(request);

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ public void testIndex() throws IOException {
661661

662662
Request request = RequestConverters.index(indexRequest);
663663
if (indexRequest.opType() == DocWriteRequest.OpType.CREATE) {
664-
assertEquals("/" + index + "/_doc/" + id + "/_create", request.getEndpoint());
664+
assertEquals("/" + index + "/_create/" + id, request.getEndpoint());
665665
} else if (id != null) {
666666
assertEquals("/" + index + "/_doc/" + id, request.getEndpoint());
667667
} else {
@@ -1685,17 +1685,17 @@ public void testEndpointBuilder() {
16851685
assertEquals("/a/b", endpointBuilder.build());
16861686
}
16871687
{
1688-
EndpointBuilder endpointBuilder = new EndpointBuilder().addPathPart("a").addPathPart("b").addPathPartAsIs("_create");
1689-
assertEquals("/a/b/_create", endpointBuilder.build());
1688+
EndpointBuilder endpointBuilder = new EndpointBuilder().addPathPart("a").addPathPart("b").addPathPartAsIs("_endpoint");
1689+
assertEquals("/a/b/_endpoint", endpointBuilder.build());
16901690
}
16911691

16921692
{
1693-
EndpointBuilder endpointBuilder = new EndpointBuilder().addPathPart("a", "b", "c").addPathPartAsIs("_create");
1694-
assertEquals("/a/b/c/_create", endpointBuilder.build());
1693+
EndpointBuilder endpointBuilder = new EndpointBuilder().addPathPart("a", "b", "c").addPathPartAsIs("_endpoint");
1694+
assertEquals("/a/b/c/_endpoint", endpointBuilder.build());
16951695
}
16961696
{
1697-
EndpointBuilder endpointBuilder = new EndpointBuilder().addPathPart("a").addPathPartAsIs("_create");
1698-
assertEquals("/a/_create", endpointBuilder.build());
1697+
EndpointBuilder endpointBuilder = new EndpointBuilder().addPathPart("a").addPathPartAsIs("_endpoint");
1698+
assertEquals("/a/_endpoint", endpointBuilder.build());
16991699
}
17001700
}
17011701

docs/java-rest/high-level/search/search.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,4 +460,5 @@ include-tagged::{doc-tests-file}[{api}-request-profiling-aggs]
460460
<4> Retrieve the time in millis spent executing the Lucene collector
461461
<5> Retrieve the profile results for the sub-aggregations (if any)
462462

463-
The Rest API documentation contains more information about {ref}/_profiling_aggregations.html[Profiling Aggregations]
463+
The Rest API documentation contains more information about
464+
{ref}/search-profile-aggregations.html[Profiling aggregations].

docs/reference/analysis/tokenfilters/common-grams-tokenfilter.asciidoc

Lines changed: 100 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,114 @@ PUT /common_grams_example
5858
"filter": {
5959
"common_grams": {
6060
"type": "common_grams",
61-
"common_words": ["a", "an", "the"]
61+
"common_words": ["the", "is", "a"]
6262
},
6363
"common_grams_query": {
6464
"type": "common_grams",
6565
"query_mode": true,
66-
"common_words": ["a", "an", "the"]
66+
"common_words": ["the", "is", "a"]
6767
}
6868
}
6969
}
7070
}
7171
}
7272
--------------------------------------------------
7373
// CONSOLE
74+
75+
You can see the output by using e.g. the `_analyze` endpoint:
76+
77+
[source,js]
78+
--------------------------------------------------
79+
POST /common_grams_example/_analyze
80+
{
81+
"analyzer" : "index_grams",
82+
"text" : "the quick brown is a fox"
83+
}
84+
--------------------------------------------------
85+
// CONSOLE
86+
// TEST[continued]
87+
88+
And the response will be:
89+
90+
[source,js]
91+
--------------------------------------------------
92+
{
93+
"tokens" : [
94+
{
95+
"token" : "the",
96+
"start_offset" : 0,
97+
"end_offset" : 3,
98+
"type" : "word",
99+
"position" : 0
100+
},
101+
{
102+
"token" : "the_quick",
103+
"start_offset" : 0,
104+
"end_offset" : 9,
105+
"type" : "gram",
106+
"position" : 0,
107+
"positionLength" : 2
108+
},
109+
{
110+
"token" : "quick",
111+
"start_offset" : 4,
112+
"end_offset" : 9,
113+
"type" : "word",
114+
"position" : 1
115+
},
116+
{
117+
"token" : "brown",
118+
"start_offset" : 10,
119+
"end_offset" : 15,
120+
"type" : "word",
121+
"position" : 2
122+
},
123+
{
124+
"token" : "brown_is",
125+
"start_offset" : 10,
126+
"end_offset" : 18,
127+
"type" : "gram",
128+
"position" : 2,
129+
"positionLength" : 2
130+
},
131+
{
132+
"token" : "is",
133+
"start_offset" : 16,
134+
"end_offset" : 18,
135+
"type" : "word",
136+
"position" : 3
137+
},
138+
{
139+
"token" : "is_a",
140+
"start_offset" : 16,
141+
"end_offset" : 20,
142+
"type" : "gram",
143+
"position" : 3,
144+
"positionLength" : 2
145+
},
146+
{
147+
"token" : "a",
148+
"start_offset" : 19,
149+
"end_offset" : 20,
150+
"type" : "word",
151+
"position" : 4
152+
},
153+
{
154+
"token" : "a_fox",
155+
"start_offset" : 19,
156+
"end_offset" : 24,
157+
"type" : "gram",
158+
"position" : 4,
159+
"positionLength" : 2
160+
},
161+
{
162+
"token" : "fox",
163+
"start_offset" : 21,
164+
"end_offset" : 24,
165+
"type" : "word",
166+
"position" : 5
167+
}
168+
]
169+
}
170+
--------------------------------------------------
171+
// TESTRESPONSE

docs/reference/commands/certgen.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ keys for each instance. If you chose to generate a CA, which is the default
5151
behavior, the certificate and private key are included in the output file. If
5252
you chose to generate CSRs, you should provide them to your commercial or
5353
organization-specific certificate authority to obtain signed certificates. The
54-
signed certificates must be in PEM format to work with {security}.
54+
signed certificates must be in PEM format to work with the {stack}
55+
{security-features}.
5556

5657
[float]
5758
=== Parameters

docs/reference/commands/certutil.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ the command produces a zip file containing the generated certificates and keys.
9393

9494
The `csr` mode generates certificate signing requests (CSRs) that you can send
9595
to a trusted certificate authority to obtain signed certificates. The signed
96-
certificates must be in PEM or PKCS#12 format to work with {security}.
96+
certificates must be in PEM or PKCS#12 format to work with {es}
97+
{security-features}.
9798

9899
By default, the command produces a single CSR for a single instance.
99100

docs/reference/commands/setup-passwords.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ bin/elasticsearch-setup-passwords auto|interactive
1919
[float]
2020
=== Description
2121

22-
This command is intended for use only during the initial configuration of
23-
{xpack}. It uses the
22+
This command is intended for use only during the initial configuration of the
23+
{es} {security-features}. It uses the
2424
{stack-ov}/built-in-users.html#bootstrap-elastic-passwords[`elastic` bootstrap password]
2525
to run user management API requests. After you set a password for the `elastic`
2626
user, the bootstrap password is no longer active and you cannot use this command.
@@ -36,7 +36,7 @@ location, ensure that the *ES_PATH_CONF* environment variable returns the
3636
correct path before you run the `elasticsearch-setup-passwords` command. You can
3737
override settings in your `elasticsearch.yml` file by using the `-E` command
3838
option. For more information about debugging connection failures, see
39-
{xpack-ref}/trb-security-setup.html[`elasticsearch-setup-passwords` command fails due to connection failure].
39+
{stack-ov}/trb-security-setup.html[`elasticsearch-setup-passwords` command fails due to connection failure].
4040

4141
[float]
4242
=== Parameters

docs/reference/docs/index_.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Another option to specify `create` is to use the following uri:
189189

190190
[source,js]
191191
--------------------------------------------------
192-
PUT twitter/_doc/1/_create
192+
PUT twitter/_create/1
193193
{
194194
"user" : "kimchy",
195195
"post_date" : "2009-11-15T14:12:12",

docs/reference/ilm/using-policies-rollover.asciidoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,19 @@ the new index, enabling indexing to continue uninterrupted.
129129

130130
beta[]
131131

132-
After an index has been rolled over by {ilm}, the
133-
`index.lifecycle.indexing_complete` setting will be set to `true` on the index.
134-
This indicates to {ilm} that this index has already been rolled over, and does
135-
not need to be rolled over again. If you <<ilm-remove-policy,remove the policy>>
136-
from an index and set it to use another policy, this setting indicates that the
137-
new policy should skip execution of the Rollover action.
138-
139-
You can also set this setting to `true` manually if you want to indicate that
140-
{ilm} should not roll over a particular index. This is useful if you need to
141-
make an exception to your normal Lifecycle Policy and switching the alias to a
132+
The `index.lifecycle.indexing_complete` setting indicates to {ilm} whether this
133+
index has already been rolled over. If it is set to `true`, that indicates that
134+
this index has already been rolled over and does not need to be rolled over
135+
again. Therefore, {ilm} will skip any Rollover Action configured in the
136+
associated lifecycle policy for this index. This is useful if you need to make
137+
an exception to your normal Lifecycle Policy and switching the alias to a
142138
different index by hand, but do not want to remove the index from {ilm}
143139
completely.
144140

141+
This setting is set to `true` automatically by ILM upon the successful
142+
completion of a Rollover Action. However, it will be removed if
143+
<<ilm-remove-policy,the policy is removed>> from the index.
144+
145145
IMPORTANT: If `index.lifecycle.indexing_complete` is set to `true` on an index,
146146
it will not be rolled over by {ilm}, but {ilm} will verify that this index is no
147147
longer the write index for the alias specified by

docs/reference/licensing/update-license.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ https://www.elastic.co/subscriptions.
4040
[float]
4141
==== Authorization
4242

43-
If {security} is enabled, you need `manage` cluster privileges to install the
44-
license.
43+
If {es} {security-features} are enabled, you need `manage` cluster privileges to
44+
install the license.
4545

46-
If {security} is enabled and you are installing a gold or platinum license, you
47-
must enable TLS on the transport networking layer before you install the license.
48-
See <<configuring-tls>>.
46+
If {es} {security-features} are enabled and you are installing a gold or platinum
47+
license, you must enable TLS on the transport networking layer before you
48+
install the license. See <<configuring-tls>>.
4949

5050
[float]
5151
==== Examples

docs/reference/migration/migrate_7_0/api.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ When putting stored scripts, support for storing them with the deprecated `templ
8888
now removed. Scripts must be stored using the `script` context as mentioned in the documentation.
8989

9090
[float]
91-
==== Get Aliases API limitations when {security} is enabled removed
91+
==== Removed Get Aliases API limitations when {security-features} are enabled
9292

9393
The behavior and response codes of the get aliases API no longer vary
94-
depending on whether {security} is enabled. Previously a
94+
depending on whether {security-features} are enabled. Previously a
9595
404 - NOT FOUND (IndexNotFoundException) could be returned in case the
9696
current user was not authorized for any alias. An empty response with
9797
status 200 - OK is now returned instead at all times.

docs/reference/migration/migrate_7_0/mappings.asciidoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,17 @@ An error will now be thrown when unknown configuration options are provided
5454
to similarities. Such unknown parameters were ignored before.
5555

5656
[float]
57-
==== deprecated `geo_shape` Prefix Tree indexing
57+
==== Changed default `geo_shape` indexing strategy
5858

5959
`geo_shape` types now default to using a vector indexing approach based on Lucene's new
6060
`LatLonShape` field type. This indexes shapes as a triangular mesh instead of decomposing
61-
them into individual grid cells. To index using legacy prefix trees `recursive` or `term`
62-
strategy must be explicitly defined. Note that these strategies are now deprecated and will
63-
be removed in a future version.
61+
them into individual grid cells. To index using legacy prefix trees the `tree` parameter
62+
must be explicitly set to one of `quadtree` or `geohash`. Note that these strategies are
63+
now deprecated and will be removed in a future version.
64+
65+
IMPORTANT NOTE: If using timed index creation from templates, the `geo_shape` mapping
66+
should also be changed in the template to explicitly define `tree` to one of `geohash`
67+
or `quadtree`. This will ensure compatibility with previously created indexes.
6468

6569
[float]
6670
==== deprecated `geo_shape` parameters

docs/reference/ml/apis/delete-job.asciidoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Deletes an existing anomaly detection job.
1919
All job configuration, model state and results are deleted.
2020

2121
IMPORTANT: Deleting a job must be done via this API only. Do not delete the
22-
job directly from the `.ml-*` indices using the Elasticsearch
23-
DELETE Document API. When {security} is enabled, make sure no `write`
24-
privileges are granted to anyone over the `.ml-*` indices.
22+
job directly from the `.ml-*` indices using the Elasticsearch delete document
23+
API. When {es} {security-features} are enabled, make sure no `write` privileges
24+
are granted to anyone over the `.ml-*` indices.
2525

2626
Before you can delete a job, you must delete the {dfeeds} that are associated
2727
with it. See <<ml-delete-datafeed,Delete {dfeeds-cap}>>. Unless the `force` parameter
@@ -47,8 +47,9 @@ separated list.
4747

4848
==== Authorization
4949

50-
You must have `manage_ml`, or `manage` cluster privileges to use this API.
51-
For more information, see {xpack-ref}/security-privileges.html[Security Privileges].
50+
If {es} {security-features} are enabled, you must have `manage_ml`, or `manage`
51+
cluster privileges to use this API.
52+
For more information, see {stack-ov}/security-privileges.html[Security Privileges].
5253

5354

5455
==== Examples

docs/reference/ml/apis/preview-datafeed.asciidoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,17 @@ structure of the data that will be passed to the anomaly detection engine.
2929

3030
==== Authorization
3131

32-
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
33-
privileges to use this API. For more information, see
34-
{xpack-ref}/security-privileges.html[Security Privileges].
32+
If {es} {security-features} are enabled, you must have `monitor_ml`, `monitor`,
33+
`manage_ml`, or `manage` cluster privileges to use this API. For more
34+
information, see
35+
{stack-ov}/security-privileges.html[Security Privileges].
3536

3637

3738
==== Security Integration
3839

39-
When {security} is enabled, the {dfeed} query will be previewed using the
40-
credentials of the user calling the preview {dfeed} API. When the {dfeed}
41-
is started it will run the query using the roles of the last user to
40+
When {es} {security-features} are enabled, the {dfeed} query is previewed using
41+
the credentials of the user calling the preview {dfeed} API. When the {dfeed}
42+
is started it runs the query using the roles of the last user to
4243
create or update it. If the two sets of roles differ then the preview may
4344
not accurately reflect what the {dfeed} will return when started. To avoid
4445
such problems, the same user that creates/updates the {dfeed} should preview

docs/reference/ml/apis/put-datafeed.asciidoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,16 @@ see <<ml-datafeed-resource>>.
8888

8989
==== Authorization
9090

91-
You must have `manage_ml`, or `manage` cluster privileges to use this API.
92-
For more information, see
93-
{xpack-ref}/security-privileges.html[Security Privileges].
91+
If {es} {security-features} are enabled, you must have `manage_ml`, or `manage`
92+
cluster privileges to use this API. For more information, see
93+
{stack-ov}/security-privileges.html[Security Privileges].
9494

9595

96-
==== Security Integration
96+
==== Security integration
9797

98-
When {security} is enabled, your {dfeed} will remember which roles the user who
99-
created it had at the time of creation, and run the query using those same roles.
98+
When {es} {security-features} are enabled, your {dfeed} remembers which roles the
99+
user who created it had at the time of creation and runs the query using those
100+
same roles.
100101

101102

102103
==== Examples

0 commit comments

Comments
 (0)