Skip to content

Commit f2093e7

Browse files
committed
Merge remote-tracking branch 'es/master' into ccr
* es/master: (30 commits) [Docs] Fix Java Api index administration usage (#28133) 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] Add WKT Support to GeoBoundingBoxQueryBuilder Painless: Add whitelist extensions (#28161) Fix daitch_mokotoff phonetic filter to use the dedicated Lucene filter (#28225) 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) Fix NPE on composite aggregation with sub-aggregations that need scores (#28129) `MockTcpTransport` to connect asynchronously (#28203) Fix synonym phrase query expansion for cross_fields parsing (#28045) Introduce elasticsearch-core jar (#28191) #28218: Update the Lucene version for 6.2.0 after backport upgrade to lucene 7.2.1 (#28218) [Docs] Fix an error in painless-types.asciidoc (#28221) ...
2 parents 1e330f7 + 67c1f1c commit f2093e7

File tree

206 files changed

+1767
-747
lines changed

Some content is hidden

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

206 files changed

+1767
-747
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:elasticsearch-nio:${version}": ':libs:elasticsearch-nio',
187188
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
188189
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',

buildSrc/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
elasticsearch = 7.0.0-alpha1
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
:version: 7.0.0-alpha1
22
:major-version: 7.x
3-
:lucene_version: 7.2.0
4-
:lucene_version_path: 7_2_0
3+
:lucene_version: 7.2.1
4+
:lucene_version_path: 7_2_1
55
:branch: master
66
:jdk: 1.8.0_131
77
:jdk_major: 8
Lines changed: 9 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,23 @@
11
[[java-admin-indices-put-mapping]]
2+
:base-dir: {docdir}/../../core/src/test/java/org/elasticsearch/action/admin/indices/create
3+
24
==== Put Mapping
35

46
The PUT mapping API allows you to add a new type while creating an index:
57

6-
[source,java]
8+
["source","java",subs="attributes,callouts,macros"]
79
--------------------------------------------------
8-
client.admin().indices().prepareCreate("twitter") <1>
9-
.addMapping("tweet", "{\n" + <2>
10-
" \"tweet\": {\n" +
11-
" \"properties\": {\n" +
12-
" \"message\": {\n" +
13-
" \"type\": \"text\"\n" +
14-
" }\n" +
15-
" }\n" +
16-
" }\n" +
17-
" }")
18-
.get();
10+
include-tagged::{base-dir}/CreateIndexIT.java[addMapping-create-index-request]
1911
--------------------------------------------------
2012
<1> <<java-admin-indices-create-index,Creates an index>> called `twitter`
2113
<2> It also adds a `tweet` mapping type.
2214

2315

2416
The PUT mapping API also allows to add a new type to an existing index:
2517

26-
[source,java]
18+
["source","java",subs="attributes,callouts,macros"]
2719
--------------------------------------------------
28-
client.admin().indices().preparePutMapping("twitter") <1>
29-
.setType("user") <2>
30-
.setSource("{\n" + <3>
31-
" \"properties\": {\n" +
32-
" \"name\": {\n" +
33-
" \"type\": \"text\"\n" +
34-
" }\n" +
35-
" }\n" +
36-
"}")
37-
.get();
38-
39-
// You can also provide the type in the source document
40-
client.admin().indices().preparePutMapping("twitter")
41-
.setType("user")
42-
.setSource("{\n" +
43-
" \"user\":{\n" + <4>
44-
" \"properties\": {\n" +
45-
" \"name\": {\n" +
46-
" \"type\": \"text\"\n" +
47-
" }\n" +
48-
" }\n" +
49-
" }\n" +
50-
"}")
51-
.get();
20+
include-tagged::{base-dir}/CreateIndexIT.java[putMapping-request-source]
5221
--------------------------------------------------
5322
<1> Puts a mapping on existing index called `twitter`
5423
<2> Adds a `user` mapping type.
@@ -57,20 +26,12 @@ client.admin().indices().preparePutMapping("twitter")
5726

5827
You can use the same API to update an existing mapping:
5928

60-
[source,java]
29+
["source","java",subs="attributes,callouts,macros"]
6130
--------------------------------------------------
62-
client.admin().indices().preparePutMapping("twitter") <1>
63-
.setType("user") <2>
64-
.setSource("{\n" + <3>
65-
" \"properties\": {\n" +
66-
" \"user_name\": {\n" +
67-
" \"type\": \"text\"\n" +
68-
" }\n" +
69-
" }\n" +
70-
"}")
71-
.get();
31+
include-tagged::{base-dir}/CreateIndexIT.java[putMapping-request-source-append]
7232
--------------------------------------------------
7333
<1> Puts a mapping on existing index called `twitter`
7434
<2> Updates the `user` mapping type.
7535
<3> This `user` has now a new field `user_name`
7636

37+
:base-dir!:

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/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/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

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)