Skip to content

Commit 76809e7

Browse files
committed
Merge remote-tracking branch 'es/6.x' into ccr-6.x
* es/6.x: (31 commits) Fix eclipse build. (#28236) Never return null from Strings.tokenizeToStringArray (#28224) Fallback to TransportMasterNodeAction for cluster health retries (#28195) [Docs] Changes to ingest.asciidoc (#28212) TEST: Update logging for testAckedIndexing [GEO] Deprecate field parameter in GeoBoundingBoxQueryBuilder [GEO] Add WKT Support to GeoBoundingBoxQueryBuilder Avoid doing redundant work when checking for self references. (#26927) Fix casts in HotThreads. (#27578) Ignore the `-snapshot` suffix when comparing the Lucene version in the build and the docs. (#27927) Allow update of `eager_global_ordinals` on `_parent`. (#28014) Painless: Add whitelist extensions (#28161) Fix daitch_mokotoff phonetic filter to use the dedicated Lucene filter (#28225) Fix NPE on composite aggregation with sub-aggregations that need scores (#28129) #28045 restore removed import after backport Fix synonym phrase query expansion for cross_fields parsing (#28045) Introduce elasticsearch-core jar (#28191) upgrade to lucene 7.2.1 (#28218) [Docs] Fix an error in painless-types.asciidoc (#28221) Consistent updates of IndexShardSnapshotStatus (#28130) ...
2 parents 16812cb + c470061 commit 76809e7

File tree

300 files changed

+2966
-1254
lines changed

Some content is hidden

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

300 files changed

+2966
-1254
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ subprojects {
183183
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
184184
"org.elasticsearch:elasticsearch:${version}": ':server',
185185
"org.elasticsearch:elasticsearch-cli:${version}": ':server:cli',
186+
"org.elasticsearch:elasticsearch-core:${version}": ':libs:elasticsearch-core',
186187
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
187188
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',
188189
"org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}": ':client:rest-high-level',

buildSrc/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
elasticsearch = 6.2.0
2-
lucene = 7.2.0
2+
lucene = 7.2.1
33

44
# optional dependencies
55
spatial4j = 0.6

client/rest/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ forbiddenApisTest {
7272
}
7373

7474
// JarHell is part of es server, which we don't want to pull in
75+
// TODO: Not anymore. Now in elasticsearch-core
7576
jarHell.enabled=false
7677

7778
namingConventions {

client/sniffer/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ dependencyLicenses {
7575
}
7676

7777
// JarHell is part of es server, which we don't want to pull in
78+
// TODO: Not anymore. Now in elasticsearch-core
7879
jarHell.enabled=false
7980

8081
namingConventions {

client/test/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ forbiddenApisTest {
4949
}
5050

5151
// JarHell is part of es server, which we don't want to pull in
52+
// TODO: Not anymore. Now in elasticsearch-core
5253
jarHell.enabled=false
5354

5455
// TODO: should we have licenses for our test deps?

docs/Versions.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:version: 6.2.0
22
:major-version: 6.x
3-
:lucene_version: 7.2.0
3+
:lucene_version: 7.2.1
44
:lucene_version_path: 7_2_0
55
:branch: 6.x
66
:jdk: 1.8.0_131

docs/painless/painless-types.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ to floating point types.
311311
| int | explicit | explicit | explicit | | implicit | implicit | implicit
312312
| long | explicit | explicit | explicit | explicit | | implicit | implicit
313313
| float | explicit | explicit | explicit | explicit | explicit | | implicit
314-
| float | explicit | explicit | explicit | explicit | explicit | explicit |
314+
| double | explicit | explicit | explicit | explicit | explicit | explicit |
315315
|====
316316

317317

@@ -376,7 +376,7 @@ cast would normally be required between the non-def types.
376376
def x; // Declare def variable x and set it to null
377377
x = 3; // Set the def variable x to the literal 3 with an implicit
378378
// cast from int to def
379-
double a = x; // Declare double variable y and set it to def variable x,
379+
double a = x; // Declare double variable a and set it to def variable x,
380380
// which contains a double
381381
int b = x; // ERROR: Results in a run-time error because an explicit cast is
382382
// required to cast from a double to an int

docs/reference/cluster/tasks.asciidoc

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,71 @@ The following command will change the grouping to parent tasks:
195195
GET _tasks?group_by=parents
196196
--------------------------------------------------
197197
// CONSOLE
198+
199+
The grouping can be disabled by specifying `none` as a `group_by` parameter:
200+
201+
[source,js]
202+
--------------------------------------------------
203+
GET _tasks?group_by=none
204+
--------------------------------------------------
205+
// CONSOLE
206+
207+
[float]
208+
=== Identifying running tasks
209+
210+
The `X-Opaque-Id` header, when provided on the HTTP request header, is going to be returned as a header in the response as well as
211+
in the `headers` field for in the task information. This allows to track certain calls, or associate certain tasks with
212+
a the client that started them:
213+
214+
[source,sh]
215+
--------------------------------------------------
216+
curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents"
217+
--------------------------------------------------
218+
// NOTCONSOLE
219+
220+
The result will look similar to the following:
221+
222+
[source,js]
223+
--------------------------------------------------
224+
HTTP/1.1 200 OK
225+
X-Opaque-Id: 123456 <1>
226+
content-type: application/json; charset=UTF-8
227+
content-length: 831
228+
229+
{
230+
"tasks" : {
231+
"u5lcZHqcQhu-rUoFaqDphA:45" : {
232+
"node" : "u5lcZHqcQhu-rUoFaqDphA",
233+
"id" : 45,
234+
"type" : "transport",
235+
"action" : "cluster:monitor/tasks/lists",
236+
"start_time_in_millis" : 1513823752749,
237+
"running_time_in_nanos" : 293139,
238+
"cancellable" : false,
239+
"headers" : {
240+
"X-Opaque-Id" : "123456" <2>
241+
},
242+
"children" : [
243+
{
244+
"node" : "u5lcZHqcQhu-rUoFaqDphA",
245+
"id" : 46,
246+
"type" : "direct",
247+
"action" : "cluster:monitor/tasks/lists[n]",
248+
"start_time_in_millis" : 1513823752750,
249+
"running_time_in_nanos" : 92133,
250+
"cancellable" : false,
251+
"parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45",
252+
"headers" : {
253+
"X-Opaque-Id" : "123456" <3>
254+
}
255+
}
256+
]
257+
}
258+
}
259+
}
260+
--------------------------------------------------
261+
// NOTCONSOLE
262+
263+
<1> id as a part of the response header
264+
<2> id for the tasks that was initiated by the REST request
265+
<3> the child task of the task initiated by the REST request

docs/reference/index-modules.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ specific index module:
186186

187187
The maximum number of characters that will be analyzed for a highlight request.
188188
This setting is only applicable when highlighting is requested on a text that was indexed without offsets or term vectors.
189-
Defaults to `10000`.
189+
By default this settings is unset in 6.x, defaults to `-1`.
190190

191191
`index.max_terms_count`::
192192

docs/reference/ingest.asciidoc

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,27 @@
33

44
[partintro]
55
--
6-
You can use ingest node to pre-process documents before the actual indexing takes place.
7-
This pre-processing happens by an ingest node that intercepts bulk and index requests, applies the
8-
transformations, and then passes the documents back to the index or bulk APIs.
6+
Use an ingest node to pre-process documents before the actual document indexing happens.
7+
The ingest node intercepts bulk and index requests, it applies transformations, and it then
8+
passes the documents back to the index or bulk APIs.
99

10-
You can enable ingest on any node or even have dedicated ingest nodes. Ingest is enabled by default
11-
on all nodes. To disable ingest on a node, configure the following setting in the `elasticsearch.yml` file:
10+
All nodes enable ingest by default, so any node can handle ingest tasks. You can also create
11+
dedicated ingest nodes. To disable ingest for a node, configure the following setting in the
12+
elasticsearch.yml file:
1213

1314
[source,yaml]
1415
--------------------------------------------------
1516
node.ingest: false
1617
--------------------------------------------------
1718

18-
To pre-process documents before indexing, you <<pipeline,define a pipeline>> that specifies
19-
a series of <<ingest-processors,processors>>. Each processor transforms the document in some way.
20-
For example, you may have a pipeline that consists of one processor that removes a field from
21-
the document followed by another processor that renames a field. Configured pipelines are then stored
22-
in the <<cluster-state,cluster state>>.
19+
To pre-process documents before indexing, <<pipeline,define a pipeline>> that specifies a series of
20+
<<ingest-processors,processors>>. Each processor transforms the document in some specific way. For example, a
21+
pipeline might have one processor that removes a field from the document, followed by
22+
another processor that renames a field. The <<cluster-state,cluster state>> then stores
23+
the configured pipelines.
2324

24-
To use a pipeline, you simply specify the `pipeline` parameter on an index or bulk request to
25-
tell the ingest node which pipeline to use. For example:
25+
To use a pipeline, simply specify the `pipeline` parameter on an index or bulk request. This
26+
way, the ingest node knows which pipeline to use. For example:
2627

2728
[source,js]
2829
--------------------------------------------------

docs/reference/migration/migrate_6_0/analysis.asciidoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ created in 5.x.
1616
Highlighting a text that was indexed without offsets or term vectors,
1717
requires analysis of this text in memory real time during the search request.
1818
For large texts this analysis may take substantial amount of time and memory.
19-
To protect against this, the maximum number of characters that will be analyzed has been
20-
limited to 10000. This default limit can be changed
21-
for a particular index with the index setting `index.highlight.max_analyzed_offset`.
19+
To protect against this, the maximum number of characters that to be analyzed will be
20+
limited to 10000 in the next major Elastic version. For this version, by default the limit
21+
is not set. A deprecation warning will be issued when an analyzed text exceeds 10000.
22+
The limit can be set for a particular index with the index setting
23+
`index.highlight.max_analyzed_offset`.

docs/reference/query-dsl/geo-bounding-box-query.asciidoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,31 @@ GET /_search
180180
--------------------------------------------------
181181
// CONSOLE
182182

183+
[float]
184+
===== Bounding Box as Well-Known Text (WKT)
185+
186+
[source,js]
187+
--------------------------------------------------
188+
GET /_search
189+
{
190+
"query": {
191+
"bool" : {
192+
"must" : {
193+
"match_all" : {}
194+
},
195+
"filter" : {
196+
"geo_bounding_box" : {
197+
"pin.location" : {
198+
"wkt" : "BBOX (-74.1, -71.12, 40.73, 40.01)"
199+
}
200+
}
201+
}
202+
}
203+
}
204+
}
205+
--------------------------------------------------
206+
// CONSOLE
207+
183208
[float]
184209
===== Geohash
185210

docs/reference/search/request/highlighting.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ needs highlighting. The `plain` highlighter always uses plain highlighting.
106106

107107
[WARNING]
108108
Plain highlighting for large texts may require substantial amount of time and memory.
109-
To protect against this, the maximum number of text characters that will be analyzed has been
110-
limited to 10000. This default limit can be changed
111-
for a particular index with the index setting `index.highlight.max_analyzed_offset`.
109+
To protect against this, the maximum number of text characters to be analyzed will be
110+
limited to 10000 in the next major Elastic version. The default limit is not set for this version,
111+
but can be set for a particular index with the index setting `index.highlight.max_analyzed_offset`.
112112

113113
[[highlighting-settings]]
114114
==== Highlighting Settings

libs/elasticsearch-core/build.gradle

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import org.elasticsearch.gradle.precommit.PrecommitTasks
2+
3+
/*
4+
* Licensed to Elasticsearch under one or more contributor
5+
* license agreements. See the NOTICE file distributed with
6+
* this work for additional information regarding copyright
7+
* ownership. Elasticsearch licenses this file to you under
8+
* the Apache License, Version 2.0 (the "License"); you may
9+
* not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing,
15+
* software distributed under the License is distributed on an
16+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
* KIND, either express or implied. See the License for the
18+
* specific language governing permissions and limitations
19+
* under the License.
20+
*/
21+
22+
apply plugin: 'elasticsearch.build'
23+
apply plugin: 'nebula.optional-base'
24+
apply plugin: 'nebula.maven-base-publish'
25+
apply plugin: 'nebula.maven-scm'
26+
27+
archivesBaseName = 'elasticsearch-core'
28+
29+
publishing {
30+
publications {
31+
nebula {
32+
artifactId = archivesBaseName
33+
}
34+
}
35+
}
36+
37+
dependencies {
38+
compile "org.apache.logging.log4j:log4j-api:${versions.log4j}"
39+
40+
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
41+
testCompile "junit:junit:${versions.junit}"
42+
testCompile "org.hamcrest:hamcrest-all:${versions.hamcrest}"
43+
44+
if (isEclipse == false || project.path == ":libs:elasticsearch-core-tests") {
45+
testCompile("org.elasticsearch.test:framework:${version}") {
46+
exclude group: 'org.elasticsearch', module: 'elasticsearch-core'
47+
}
48+
}
49+
}
50+
51+
forbiddenApisMain {
52+
// elasticsearch-core does not depend on server
53+
// TODO: Need to decide how we want to handle for forbidden signatures with the changes to core
54+
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
55+
}
56+
57+
if (isEclipse) {
58+
// in eclipse the project is under a fake root, we need to change around the source sets
59+
sourceSets {
60+
if (project.path == ":libs:elasticsearch-core") {
61+
main.java.srcDirs = ['java']
62+
main.resources.srcDirs = ['resources']
63+
} else {
64+
test.java.srcDirs = ['java']
65+
test.resources.srcDirs = ['resources']
66+
}
67+
}
68+
}
69+
70+
thirdPartyAudit.excludes = [
71+
// from log4j
72+
'org/osgi/framework/AdaptPermission',
73+
'org/osgi/framework/AdminPermission',
74+
'org/osgi/framework/Bundle',
75+
'org/osgi/framework/BundleActivator',
76+
'org/osgi/framework/BundleContext',
77+
'org/osgi/framework/BundleEvent',
78+
'org/osgi/framework/SynchronousBundleListener',
79+
'org/osgi/framework/wiring/BundleWire',
80+
'org/osgi/framework/wiring/BundleWiring'
81+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7a2999229464e7a324aa503c0a52ec0f05efe7bd

0 commit comments

Comments
 (0)