Skip to content

Commit d53649b

Browse files
committed
Merge branch 'master' of github.com:elastic/elasticsearch into 2018-03-28-double-check-local-checkpoint
2 parents 9b2a6d8 + 451a328 commit d53649b

File tree

144 files changed

+2231
-1461
lines changed

Some content is hidden

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

144 files changed

+2231
-1461
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ class BuildPlugin implements Plugin<Project> {
551551
if (project.licenseFile == null || project.noticeFile == null) {
552552
throw new GradleException("Must specify license and notice file for project ${project.path}")
553553
}
554-
jarTask.into('META-INF') {
554+
jarTask.metaInf {
555555
from(project.licenseFile.parent) {
556556
include project.licenseFile.name
557557
}

buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
package org.elasticsearch.gradle.precommit
2020

21+
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
2122
import de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin
2223
import org.gradle.api.Project
2324
import org.gradle.api.Task
@@ -83,17 +84,14 @@ class PrecommitTasks {
8384
getClass().getResource('/forbidden/es-all-signatures.txt')]
8485
suppressAnnotations = ['**.SuppressForbidden']
8586
}
86-
Task mainForbidden = project.tasks.findByName('forbiddenApisMain')
87-
if (mainForbidden != null) {
88-
mainForbidden.configure {
89-
signaturesURLs += getClass().getResource('/forbidden/es-server-signatures.txt')
90-
}
91-
}
92-
Task testForbidden = project.tasks.findByName('forbiddenApisTest')
93-
if (testForbidden != null) {
94-
testForbidden.configure {
95-
signaturesURLs += getClass().getResource('/forbidden/es-test-signatures.txt')
96-
signaturesURLs += getClass().getResource('/forbidden/http-signatures.txt')
87+
project.tasks.withType(CheckForbiddenApis) {
88+
// we do not use the += operator to add signatures, as conventionMappings of Gradle do not work when it's configured using withType:
89+
if (name.endsWith('Test')) {
90+
signaturesURLs = project.forbiddenApis.signaturesURLs +
91+
[ getClass().getResource('/forbidden/es-test-signatures.txt'), getClass().getResource('/forbidden/http-signatures.txt') ]
92+
} else {
93+
signaturesURLs = project.forbiddenApis.signaturesURLs +
94+
[ getClass().getResource('/forbidden/es-server-signatures.txt') ]
9795
}
9896
}
9997
Task forbiddenApis = project.tasks.findByName('forbiddenApis')
@@ -144,21 +142,15 @@ class PrecommitTasks {
144142
]
145143
toolVersion = 7.5
146144
}
147-
for (String taskName : ['checkstyleMain', 'checkstyleJava9', 'checkstyleTest']) {
148-
Task task = project.tasks.findByName(taskName)
149-
if (task != null) {
150-
project.tasks['check'].dependsOn.remove(task)
151-
checkstyleTask.dependsOn(task)
152-
task.dependsOn(copyCheckstyleConf)
153-
task.inputs.file(checkstyleSuppressions)
154-
task.reports {
155-
html.enabled false
156-
}
157-
}
158-
}
159145

160-
project.tasks.withType(Checkstyle) {
161-
dependsOn(copyCheckstyleConf)
146+
project.tasks.withType(Checkstyle) { task ->
147+
project.tasks[JavaBasePlugin.CHECK_TASK_NAME].dependsOn.remove(task)
148+
checkstyleTask.dependsOn(task)
149+
task.dependsOn(copyCheckstyleConf)
150+
task.inputs.file(checkstyleSuppressions)
151+
task.reports {
152+
html.enabled false
153+
}
162154
}
163155

164156
return checkstyleTask

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ class ClusterFormationTasks {
494494
* the short name requiring the path to already exist.
495495
*/
496496
final Object esPluginUtil = "${-> node.binPath().resolve('elasticsearch-plugin').toString()}"
497-
final Object[] args = [esPluginUtil, 'install', file]
497+
final Object[] args = [esPluginUtil, 'install', '--batch', file]
498498
return configureExecTask(name, project, setup, node, args)
499499
}
500500

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.3.0-snapshot-98a6b3d
2+
lucene = 7.3.0
33

44
# optional dependencies
55
spatial4j = 0.7

distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/InstallPluginCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ protected void printAdditionalHelp(Terminal terminal) {
208208
@Override
209209
protected void execute(Terminal terminal, OptionSet options, Environment env) throws Exception {
210210
String pluginId = arguments.value(options);
211-
boolean isBatch = options.has(batchOption) || System.console() == null;
211+
final boolean isBatch = options.has(batchOption);
212212
execute(terminal, pluginId, isBatch, env);
213213
}
214214

docs/reference/cat/thread_pool.asciidoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,15 @@ in the table below.
113113
|Field Name |Alias |Description
114114
|`type` |`t` |The current (*) type of thread pool (`fixed` or `scaling`)
115115
|`active` |`a` |The number of active threads in the current thread pool
116-
|`size` |`s` |The number of threads in the current thread pool
116+
|`pool_size` |`psz` |The number of threads in the current thread pool
117117
|`queue` |`q` |The number of tasks in the queue for the current thread pool
118118
|`queue_size` |`qs` |The maximum number of tasks permitted in the queue for the current thread pool
119119
|`rejected` |`r` |The number of tasks rejected by the thread pool executor
120120
|`largest` |`l` |The highest number of active threads in the current thread pool
121121
|`completed` |`c` |The number of tasks completed by the thread pool executor
122-
|`min` |`mi` |The configured minimum number of active threads allowed in the current thread pool
123-
|`max` |`ma` |The configured maximum number of active threads allowed in the current thread pool
122+
|`core` |`cr` |The configured core number of active threads allowed in the current thread pool
123+
|`max` |`mx` |The configured maximum number of active threads allowed in the current thread pool
124+
|`size` |`sz` |The configured fixed number of active threads allowed in the current thread pool
124125
|`keep_alive` |`k` |The configured keep alive time for threads
125126
|=======================================================================
126127

docs/reference/docs/update.asciidoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ POST test/_doc/1/_update
118118

119119
The update API also support passing a partial document,
120120
which will be merged into the existing document (simple recursive merge,
121-
inner merging of objects, replacing core "keys/values" and arrays). For
122-
example:
121+
inner merging of objects, replacing core "keys/values" and arrays).
122+
To fully replace the existing document, the <<docs-index_,`index` API>> should
123+
be used instead.
124+
The following partial update adds a new field to the
125+
existing document:
123126

124127
[source,js]
125128
--------------------------------------------------

docs/reference/getting-started.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ GET /bank/_search
777777
// CONSOLE
778778
// TEST[continued]
779779

780-
The difference here is that instead of passing `q=*` in the URI, we POST a JSON-style query request body to the `_search` API. We'll discuss this JSON query in the next section.
780+
The difference here is that instead of passing `q=*` in the URI, we provide a JSON-style query request body to the `_search` API. We'll discuss this JSON query in the next section.
781781

782782
////
783783
Hidden response just so we can assert that it is indeed the same but don't have

docs/reference/index-modules/similarity.asciidoc

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,6 @@ This similarity has the following options:
8282

8383
Type name: `BM25`
8484

85-
[float]
86-
[[classic-similarity]]
87-
==== Classic similarity
88-
89-
The classic similarity that is based on the TF/IDF model. This
90-
similarity has the following option:
91-
92-
`discount_overlaps`::
93-
Determines whether overlap tokens (Tokens with
94-
0 position increment) are ignored when computing norm. By default this
95-
is true, meaning overlap tokens do not count when computing norms.
96-
97-
Type name: `classic`
98-
9985
[float]
10086
[[dfr]]
10187
==== DFR similarity
@@ -541,7 +527,7 @@ PUT /index
541527
"index": {
542528
"similarity": {
543529
"default": {
544-
"type": "classic"
530+
"type": "boolean"
545531
}
546532
}
547533
}
@@ -563,7 +549,7 @@ PUT /index/_settings
563549
"index": {
564550
"similarity": {
565551
"default": {
566-
"type": "classic"
552+
"type": "boolean"
567553
}
568554
}
569555
}

docs/reference/mapping/params/similarity.asciidoc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@ PUT my_index
4444
"default_field": { <1>
4545
"type": "text"
4646
},
47-
"classic_field": {
48-
"type": "text",
49-
"similarity": "classic" <2>
50-
},
5147
"boolean_sim_field": {
5248
"type": "text",
53-
"similarity": "boolean" <3>
49+
"similarity": "boolean" <2>
5450
}
5551
}
5652
}
@@ -59,5 +55,4 @@ PUT my_index
5955
--------------------------------------------------
6056
// CONSOLE
6157
<1> The `default_field` uses the `BM25` similarity.
62-
<2> The `classic_field` uses the `classic` similarity (ie TF/IDF).
63-
<3> The `boolean_sim_field` uses the `boolean` similarity.
58+
<2> The `boolean_sim_field` uses the `boolean` similarity.

0 commit comments

Comments
 (0)