Skip to content

Commit 2d5f4bc

Browse files
committed
Merge branch 'master' into feature/query-refactoring
Conflicts: core/src/main/java/org/elasticsearch/index/query/ExistsQueryParser.java core/src/main/java/org/elasticsearch/index/query/ScriptQueryBuilder.java
2 parents 194b290 + 283f3c3 commit 2d5f4bc

File tree

190 files changed

+2823
-9360
lines changed

Some content is hidden

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

190 files changed

+2823
-9360
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ You will find the newly built packages under: `./target/releases/`.
100100
Before submitting your changes, run the test suite to make sure that nothing is broken, with:
101101

102102
```sh
103-
ES_TEST_LOCAL=true
104-
mvn clean test
103+
mvn clean test -Dtests.slow=true
105104
```
106105

107106
Source: [Contributing to elasticsearch](http://www.elasticsearch.org/contributing-to-elasticsearch/)

README.textile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Elasticsearch uses "Maven":http://maven.apache.org for its build system.
205205
In order to create a distribution, simply run the @mvn clean package
206206
-DskipTests@ command in the cloned directory.
207207

208-
The distribution will be created under @target/releases@.
208+
The distribution for each project will be created under the @target/releases@ directory in that project.
209209

210210
See the "TESTING":TESTING.asciidoc file for more information about
211211
running the Elasticsearch test suite.

core/pom.xml

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -66,69 +66,56 @@
6666
<dependency>
6767
<groupId>org.apache.lucene</groupId>
6868
<artifactId>lucene-core</artifactId>
69-
<scope>compile</scope>
7069
</dependency>
7170
<dependency>
7271
<groupId>org.apache.lucene</groupId>
7372
<artifactId>lucene-backward-codecs</artifactId>
74-
<scope>compile</scope>
7573
</dependency>
7674
<dependency>
7775
<groupId>org.apache.lucene</groupId>
7876
<artifactId>lucene-analyzers-common</artifactId>
79-
<scope>compile</scope>
8077
</dependency>
8178
<dependency>
8279
<groupId>org.apache.lucene</groupId>
8380
<artifactId>lucene-queries</artifactId>
84-
<scope>compile</scope>
8581
</dependency>
8682
<dependency>
8783
<groupId>org.apache.lucene</groupId>
8884
<artifactId>lucene-memory</artifactId>
89-
<scope>compile</scope>
9085
</dependency>
9186
<dependency>
9287
<groupId>org.apache.lucene</groupId>
9388
<artifactId>lucene-highlighter</artifactId>
94-
<scope>compile</scope>
9589
</dependency>
9690
<dependency>
9791
<groupId>org.apache.lucene</groupId>
9892
<artifactId>lucene-queryparser</artifactId>
99-
<scope>compile</scope>
10093
</dependency>
10194
<dependency>
10295
<groupId>org.apache.lucene</groupId>
10396
<artifactId>lucene-suggest</artifactId>
104-
<scope>compile</scope>
10597
</dependency>
10698
<dependency>
10799
<groupId>org.apache.lucene</groupId>
108100
<artifactId>lucene-join</artifactId>
109-
<scope>compile</scope>
110101
</dependency>
111102
<dependency>
112103
<groupId>org.apache.lucene</groupId>
113104
<artifactId>lucene-spatial</artifactId>
114-
<scope>compile</scope>
115105
</dependency>
116106
<dependency>
117107
<groupId>org.apache.lucene</groupId>
118108
<artifactId>lucene-expressions</artifactId>
119-
<scope>compile</scope>
120109
<optional>true</optional>
121110
</dependency>
122111
<dependency>
123112
<groupId>com.spatial4j</groupId>
124113
<artifactId>spatial4j</artifactId>
125-
<scope>compile</scope>
126114
<optional>true</optional>
127115
</dependency>
128116
<dependency>
129117
<groupId>com.vividsolutions</groupId>
130118
<artifactId>jts</artifactId>
131-
<scope>compile</scope>
132119
<optional>true</optional>
133120
</dependency>
134121
<!-- needed for templating -->
@@ -140,129 +127,96 @@
140127
<!-- Lucene spatial -->
141128

142129

143-
<!-- START: dependencies that are shaded -->
130+
<!-- START: dependencies that might be shaded -->
144131
<dependency>
145132
<groupId>com.google.guava</groupId>
146133
<artifactId>guava</artifactId>
147-
<scope>compile</scope>
148134
</dependency>
149-
150135
<dependency>
151136
<groupId>com.carrotsearch</groupId>
152137
<artifactId>hppc</artifactId>
153138
</dependency>
154-
155139
<dependency>
156140
<groupId>joda-time</groupId>
157141
<artifactId>joda-time</artifactId>
158-
<scope>compile</scope>
159142
</dependency>
160143
<dependency>
161144
<groupId>org.joda</groupId>
162145
<artifactId>joda-convert</artifactId>
163-
<scope>compile</scope>
164146
</dependency>
165-
166147
<dependency>
167148
<groupId>com.fasterxml.jackson.core</groupId>
168149
<artifactId>jackson-core</artifactId>
169-
<scope>compile</scope>
170150
</dependency>
171-
172151
<dependency>
173152
<groupId>com.fasterxml.jackson.dataformat</groupId>
174153
<artifactId>jackson-dataformat-smile</artifactId>
175-
<scope>compile</scope>
176154
</dependency>
177-
178155
<dependency>
179156
<groupId>com.fasterxml.jackson.dataformat</groupId>
180157
<artifactId>jackson-dataformat-yaml</artifactId>
181-
<scope>compile</scope>
182158
<exclusions>
183159
<exclusion>
184160
<groupId>com.fasterxml.jackson.core</groupId>
185161
<artifactId>jackson-databind</artifactId>
186162
</exclusion>
187163
</exclusions>
188164
</dependency>
189-
190165
<dependency>
191166
<groupId>com.fasterxml.jackson.dataformat</groupId>
192167
<artifactId>jackson-dataformat-cbor</artifactId>
193-
<scope>compile</scope>
194168
</dependency>
195-
196169
<dependency>
197170
<groupId>io.netty</groupId>
198171
<artifactId>netty</artifactId>
199-
<scope>compile</scope>
200172
</dependency>
201-
202173
<dependency>
203174
<groupId>com.ning</groupId>
204175
<artifactId>compress-lzf</artifactId>
205-
<scope>compile</scope>
206176
</dependency>
207-
208177
<dependency>
209178
<groupId>com.tdunning</groupId>
210179
<artifactId>t-digest</artifactId>
211-
<scope>compile</scope>
212180
</dependency>
213-
214181
<dependency>
215182
<groupId>org.apache.commons</groupId>
216183
<artifactId>commons-lang3</artifactId>
217184
</dependency>
218-
219185
<dependency>
220186
<groupId>commons-cli</groupId>
221187
<artifactId>commons-cli</artifactId>
222188
</dependency>
223-
224-
<!-- END: dependencies that are shaded -->
189+
<!-- END: dependencies that might be shaded -->
225190

226191
<dependency>
227192
<groupId>org.codehaus.groovy</groupId>
228193
<artifactId>groovy-all</artifactId>
229194
<classifier>indy</classifier>
230-
<scope>compile</scope>
231195
<optional>true</optional>
232196
</dependency>
233-
234197
<dependency>
235198
<groupId>log4j</groupId>
236199
<artifactId>log4j</artifactId>
237-
<scope>compile</scope>
238200
<optional>true</optional>
239201
</dependency>
240-
241202
<dependency>
242203
<groupId>log4j</groupId>
243204
<artifactId>apache-log4j-extras</artifactId>
244-
<scope>compile</scope>
245205
<optional>true</optional>
246206
</dependency>
247-
248207
<dependency>
249208
<groupId>org.slf4j</groupId>
250209
<artifactId>slf4j-api</artifactId>
251-
<scope>compile</scope>
252210
<optional>true</optional>
253211
</dependency>
254-
255212
<dependency>
256213
<groupId>net.java.dev.jna</groupId>
257214
<artifactId>jna</artifactId>
258-
<scope>compile</scope>
259215
<optional>true</optional>
260216
</dependency>
261-
262217
<dependency>
263218
<groupId>org.fusesource</groupId>
264219
<artifactId>sigar</artifactId>
265-
<scope>compile</scope>
266220
<optional>true</optional>
267221
</dependency>
268222

core/src/main/java/org/elasticsearch/Version.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,10 @@ public class Version {
242242
public static final Version V_1_6_0 = new Version(V_1_6_0_ID, false, org.apache.lucene.util.Version.LUCENE_4_10_4);
243243
public static final int V_1_6_1_ID = 1060199;
244244
public static final Version V_1_6_1 = new Version(V_1_6_1_ID, true, org.apache.lucene.util.Version.LUCENE_4_10_4);
245+
public static final int V_1_7_0_ID = 1070099;
246+
public static final Version V_1_7_0 = new Version(V_1_7_0_ID, true, org.apache.lucene.util.Version.LUCENE_4_10_4);
245247
public static final int V_2_0_0_ID = 2000099;
246-
public static final Version V_2_0_0 = new Version(V_2_0_0_ID, true, org.apache.lucene.util.Version.LUCENE_5_2_0);
248+
public static final Version V_2_0_0 = new Version(V_2_0_0_ID, true, org.apache.lucene.util.Version.LUCENE_5_2_1);
247249

248250
public static final Version CURRENT = V_2_0_0;
249251

@@ -259,6 +261,8 @@ public static Version fromId(int id) {
259261
switch (id) {
260262
case V_2_0_0_ID:
261263
return V_2_0_0;
264+
case V_1_7_0_ID:
265+
return V_1_7_0;
262266
case V_1_6_1_ID:
263267
return V_1_6_1;
264268
case V_1_6_0_ID:

core/src/main/java/org/elasticsearch/action/admin/indices/mapping/get/TransportGetFieldMappingsIndexAction.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,6 @@ public Boolean paramAsBoolean(String key, Boolean defaultValue) {
165165
}
166166
return defaultValue;
167167
}
168-
169-
@Override
170-
@Deprecated
171-
public Boolean paramAsBooleanOptional(String key, Boolean defaultValue) {
172-
return paramAsBoolean(key, defaultValue);
173-
}
174168
};
175169

176170
private ImmutableMap<String, FieldMappingMetaData> findFieldMappingsByType(DocumentMapper documentMapper, GetFieldMappingsIndexRequest request) {

core/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -430,60 +430,6 @@ public SearchRequestBuilder addScriptField(String name, Script script) {
430430
return this;
431431
}
432432

433-
/**
434-
* Adds a script based field to load and return. The field does not have to
435-
* be stored, but its recommended to use non analyzed or numeric fields.
436-
*
437-
* @param name
438-
* The name that will represent this value in the return hit
439-
* @param script
440-
* The script to use
441-
* @deprecated Use {@link #addScriptField(String, Script)} instead.
442-
*/
443-
@Deprecated
444-
public SearchRequestBuilder addScriptField(String name, String script) {
445-
sourceBuilder().scriptField(name, script);
446-
return this;
447-
}
448-
449-
/**
450-
* Adds a script based field to load and return. The field does not have to
451-
* be stored, but its recommended to use non analyzed or numeric fields.
452-
*
453-
* @param name
454-
* The name that will represent this value in the return hit
455-
* @param script
456-
* The script to use
457-
* @param params
458-
* Parameters that the script can use.
459-
* @deprecated Use {@link #addScriptField(String, Script)} instead.
460-
*/
461-
@Deprecated
462-
public SearchRequestBuilder addScriptField(String name, String script, Map<String, Object> params) {
463-
sourceBuilder().scriptField(name, script, params);
464-
return this;
465-
}
466-
467-
/**
468-
* Adds a script based field to load and return. The field does not have to
469-
* be stored, but its recommended to use non analyzed or numeric fields.
470-
*
471-
* @param name
472-
* The name that will represent this value in the return hit
473-
* @param lang
474-
* The language of the script
475-
* @param script
476-
* The script to use
477-
* @param params
478-
* Parameters that the script can use (can be <tt>null</tt>).
479-
* @deprecated Use {@link #addScriptField(String, Script)} instead.
480-
*/
481-
@Deprecated
482-
public SearchRequestBuilder addScriptField(String name, String lang, String script, Map<String, Object> params) {
483-
sourceBuilder().scriptField(name, lang, script, params);
484-
return this;
485-
}
486-
487433
/**
488434
* Adds a sort against the given field name and the sort ordering.
489435
*

core/src/main/java/org/elasticsearch/action/suggest/TransportSuggestAction.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import org.elasticsearch.index.IndexService;
4040
import org.elasticsearch.index.engine.Engine;
4141
import org.elasticsearch.index.shard.IndexShard;
42-
import org.elasticsearch.index.suggest.stats.ShardSuggestService;
42+
import org.elasticsearch.index.suggest.stats.ShardSuggestMetric;
4343
import org.elasticsearch.indices.IndicesService;
4444
import org.elasticsearch.search.suggest.Suggest;
4545
import org.elasticsearch.search.suggest.SuggestPhase;
@@ -130,8 +130,8 @@ protected SuggestResponse newResponse(SuggestRequest request, AtomicReferenceArr
130130
protected ShardSuggestResponse shardOperation(ShardSuggestRequest request) {
131131
IndexService indexService = indicesService.indexServiceSafe(request.shardId().getIndex());
132132
IndexShard indexShard = indexService.shardSafe(request.shardId().id());
133-
ShardSuggestService shardSuggestService = indexShard.shardSuggestService();
134-
shardSuggestService.preSuggest();
133+
ShardSuggestMetric suggestMetric = indexShard.getSuggestMetric();
134+
suggestMetric.preSuggest();
135135
long startTime = System.nanoTime();
136136
XContentParser parser = null;
137137
try (Engine.Searcher searcher = indexShard.acquireSearcher("suggest")) {
@@ -153,7 +153,7 @@ protected ShardSuggestResponse shardOperation(ShardSuggestRequest request) {
153153
if (parser != null) {
154154
parser.close();
155155
}
156-
shardSuggestService.postSuggest(System.nanoTime() - startTime);
156+
suggestMetric.postSuggest(System.nanoTime() - startTime);
157157
}
158158
}
159159
}

0 commit comments

Comments
 (0)