Skip to content

Commit f914113

Browse files
Merge remote-tracking branch 'elastic/master' into 61034-fix
2 parents 6f4526b + 990381f commit f914113

File tree

92 files changed

+1724
-1241
lines changed

Some content is hidden

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

92 files changed

+1724
-1241
lines changed

buildSrc/src/main/java/org/elasticsearch/gradle/ElasticsearchDistribution.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ public Extracted getExtracted() {
225225
switch (getType()) {
226226
case DEB:
227227
case DOCKER:
228+
case DOCKER_UBI:
228229
case RPM:
229230
throw new UnsupportedOperationException(
230231
"distribution type [" + getType() + "] for " + "elasticsearch distribution [" + name + "] cannot be extracted"

docs/reference/index.asciidoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,30 @@ include::setup.asciidoc[]
2020

2121
include::upgrade.asciidoc[]
2222

23+
include::index-modules.asciidoc[]
24+
25+
include::mapping.asciidoc[]
26+
27+
include::analysis.asciidoc[]
28+
2329
include::indices/index-templates.asciidoc[]
2430

2531
include::data-streams/data-streams.asciidoc[]
2632

33+
include::ingest.asciidoc[]
34+
2735
include::search/search-your-data.asciidoc[]
2836

2937
include::query-dsl.asciidoc[]
3038

39+
include::aggregations.asciidoc[]
40+
3141
include::eql/eql.asciidoc[]
3242

3343
include::sql/index.asciidoc[]
3444

35-
include::aggregations.asciidoc[]
36-
3745
include::scripting.asciidoc[]
3846

39-
include::mapping.asciidoc[]
40-
41-
include::analysis.asciidoc[]
42-
43-
include::index-modules.asciidoc[]
44-
45-
include::ingest.asciidoc[]
46-
4747
include::ilm/index.asciidoc[]
4848

4949
ifdef::permanently-unreleased-branch[]

docs/reference/mapping/types/boolean.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ strings which are interpreted as either true or false:
1010
[horizontal]
1111
False values::
1212

13-
`false`, `"false"`
13+
`false`, `"false"`, `""` (empty string)
1414

1515
True values::
1616

docs/reference/modules/indices/circuit_breaker.asciidoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ live cluster with the <<cluster-update-settings,cluster-update-settings>> API.
1515
The parent-level breaker can be configured with the following settings:
1616

1717
`indices.breaker.total.use_real_memory`::
18-
19-
_Static_ setting determining whether the parent breaker should take real
18+
(<<static-cluster-setting,Static>>)
19+
Determines whether the parent breaker should take real
2020
memory usage into account (`true`) or only consider the amount that is
2121
reserved by child circuit breakers (`false`). Defaults to `true`.
2222

2323
[[indices-breaker-total-limit]]
2424
// tag::indices-breaker-total-limit-tag[]
2525
`indices.breaker.total.limit` {ess-icon}::
26-
26+
(<<dynamic-cluster-setting,Dynamic>>)
2727
Starting limit for overall parent breaker. Defaults to 70% of JVM heap if
2828
`indices.breaker.total.use_real_memory` is `false`. If `indices.breaker.total.use_real_memory`
2929
is `true`, defaults to 95% of the JVM heap.
@@ -41,14 +41,14 @@ parameters:
4141
[[fielddata-circuit-breaker-limit]]
4242
// tag::fielddata-circuit-breaker-limit-tag[]
4343
`indices.breaker.fielddata.limit` {ess-icon}::
44-
44+
(<<dynamic-cluster-setting,Dynamic>>)
4545
Limit for fielddata breaker. Defaults to 40% of JVM heap.
4646
// end::fielddata-circuit-breaker-limit-tag[]
4747

4848
[[fielddata-circuit-breaker-overhead]]
4949
// tag::fielddata-circuit-breaker-overhead-tag[]
5050
`indices.breaker.fielddata.overhead` {ess-icon}::
51-
51+
(<<dynamic-cluster-setting,Dynamic>>)
5252
A constant that all field data estimations are multiplied with to determine a
5353
final estimation. Defaults to `1.03`.
5454
// end::fielddata-circuit-breaker-overhead-tag[]
@@ -64,14 +64,14 @@ request) from exceeding a certain amount of memory.
6464
[[request-breaker-limit]]
6565
// tag::request-breaker-limit-tag[]
6666
`indices.breaker.request.limit` {ess-icon}::
67-
67+
(<<dynamic-cluster-setting,Dynamic>>)
6868
Limit for request breaker, defaults to 60% of JVM heap.
6969
// end::request-breaker-limit-tag[]
7070

7171
[[request-breaker-overhead]]
7272
// tag::request-breaker-overhead-tag[]
7373
`indices.breaker.request.overhead` {ess-icon}::
74-
74+
(<<dynamic-cluster-setting,Dynamic>>)
7575
A constant that all request estimations are multiplied with to determine a
7676
final estimation. Defaults to `1`.
7777
// end::request-breaker-overhead-tag[]
@@ -87,12 +87,12 @@ circuit breaker also considers that memory is not only needed for representing t
8787
also as a structured object which is reflected by default overhead.
8888

8989
`network.breaker.inflight_requests.limit`::
90-
90+
(<<dynamic-cluster-setting,Dynamic>>)
9191
Limit for in flight requests breaker, defaults to 100% of JVM heap. This means that it is bound
9292
by the limit configured for the parent circuit breaker.
9393

9494
`network.breaker.inflight_requests.overhead`::
95-
95+
(<<dynamic-cluster-setting,Dynamic>>)
9696
A constant that all in flight requests estimations are multiplied with to determine a
9797
final estimation. Defaults to 2.
9898

@@ -105,12 +105,12 @@ usage of things held in memory that are not released when a request is
105105
completed. This includes things like the Lucene segment memory.
106106

107107
`indices.breaker.accounting.limit`::
108-
108+
(<<dynamic-cluster-setting,Dynamic>>)
109109
Limit for accounting breaker, defaults to 100% of JVM heap. This means that it is bound
110110
by the limit configured for the parent circuit breaker.
111111

112112
`indices.breaker.accounting.overhead`::
113-
113+
(<<dynamic-cluster-setting,Dynamic>>)
114114
A constant that all accounting estimations are multiplied with to determine a
115115
final estimation. Defaults to 1
116116

@@ -126,7 +126,7 @@ See the "prefer-parameters" section of the <<modules-scripting-using,scripting>>
126126
documentation for more information.
127127

128128
`script.context.$CONTEXT.max_compilations_rate`::
129-
129+
(<<dynamic-cluster-setting,Dynamic>>)
130130
Limit for the number of unique dynamic scripts within a certain interval
131131
that are allowed to be compiled for a given context. Defaults to `75/5m`,
132132
meaning 75 every 5 minutes.

docs/reference/query-dsl/multi-match-query.asciidoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,11 @@ per-term `blended` queries. It accepts:
500500

501501
[horizontal]
502502
`0.0`:: Take the single best score out of (eg) `first_name:will`
503-
and `last_name:will` (*default*)
503+
and `last_name:will` (*default* for all `multi_match`
504+
query types except `bool_prefix` and `most_fields`)
504505
`1.0`:: Add together the scores for (eg) `first_name:will` and
505-
`last_name:will`
506+
`last_name:will` (*default* for the `bool_prefix` and
507+
`most_fields` `multi_match` query types)
506508
`0.0 < n < 1.0`:: Take the single best score plus +tie_breaker+ multiplied
507509
by each of the scores from other matching fields.
508510

modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeatureFieldMapper.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,16 @@ private Float objectToFloat(Object value) {
181181
}
182182

183183
@Override
184-
protected Float parseSourceValue(Object value, String format) {
184+
public ValueFetcher valueFetcher(MapperService mapperService, String format) {
185185
if (format != null) {
186186
throw new IllegalArgumentException("Field [" + name() + "] of type [" + typeName() + "] doesn't support formats.");
187187
}
188-
return objectToFloat(value);
188+
return new SourceValueFetcher(name(), mapperService, parsesArrayValue()) {
189+
@Override
190+
protected Float parseSourceValue(Object value) {
191+
return objectToFloat(value);
192+
}
193+
};
189194
}
190195

191196
@Override

modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeaturesFieldMapper.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,16 @@ protected void parseCreateField(ParseContext context) throws IOException {
160160
}
161161

162162
@Override
163-
protected Object parseSourceValue(Object value, String format) {
163+
public ValueFetcher valueFetcher(MapperService mapperService, String format) {
164164
if (format != null) {
165165
throw new IllegalArgumentException("Field [" + name() + "] of type [" + typeName() + "] doesn't support formats.");
166166
}
167-
return value;
167+
return new SourceValueFetcher(name(), mapperService, parsesArrayValue()) {
168+
@Override
169+
protected Object parseSourceValue(Object value) {
170+
return value;
171+
}
172+
};
168173
}
169174

170175
@Override

modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/ScaledFloatFieldMapper.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,6 @@ protected ScaledFloatFieldMapper clone() {
356356
return (ScaledFloatFieldMapper) super.clone();
357357
}
358358

359-
@Override
360-
protected Double nullValue() {
361-
return nullValue;
362-
}
363-
364359
@Override
365360
protected void parseCreateField(ParseContext context) throws IOException {
366361

@@ -480,25 +475,30 @@ private static double objectToDouble(Object value) {
480475
}
481476

482477
@Override
483-
protected Double parseSourceValue(Object value, String format) {
478+
public ValueFetcher valueFetcher(MapperService mapperService, String format) {
484479
if (format != null) {
485480
throw new IllegalArgumentException("Field [" + name() + "] of type [" + typeName() + "] doesn't support formats.");
486481
}
482+
return new SourceValueFetcher(name(), mapperService, parsesArrayValue()) {
483+
@Override
484+
protected Double parseSourceValue(Object value) {
485+
double doubleValue;
486+
if (value.equals("")) {
487+
if (nullValue == null) {
488+
return null;
489+
}
490+
doubleValue = nullValue;
491+
} else {
492+
doubleValue = objectToDouble(value);
493+
}
487494

488-
double doubleValue;
489-
if (value.equals("")) {
490-
if (nullValue == null) {
491-
return null;
495+
double scalingFactor = fieldType().getScalingFactor();
496+
return Math.round(doubleValue * scalingFactor) / scalingFactor;
492497
}
493-
doubleValue = nullValue;
494-
} else {
495-
doubleValue = objectToDouble(value);
496-
}
497-
498-
double scalingFactor = fieldType().getScalingFactor();
499-
return Math.round(doubleValue * scalingFactor) / scalingFactor;
498+
};
500499
}
501500

501+
502502
private static class ScaledFloatIndexFieldData extends IndexNumericFieldData {
503503

504504
private final IndexNumericFieldData scaledFieldData;

modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldMapper.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ protected void parseCreateField(ParseContext context) {
419419
}
420420

421421
@Override
422-
protected Object parseSourceValue(Object value, String format) {
422+
public ValueFetcher valueFetcher(MapperService mapperService, String format) {
423423
throw new UnsupportedOperationException();
424424
}
425425

@@ -465,7 +465,7 @@ protected void mergeOptions(FieldMapper other, List<String> conflicts) {
465465
}
466466

467467
@Override
468-
protected Object parseSourceValue(Object value, String format) {
468+
public ValueFetcher valueFetcher(MapperService mapperService, String format) {
469469
throw new UnsupportedOperationException();
470470
}
471471

@@ -588,11 +588,8 @@ protected void parseCreateField(ParseContext context) throws IOException {
588588
}
589589

590590
@Override
591-
protected String parseSourceValue(Object value, String format) {
592-
if (format != null) {
593-
throw new IllegalArgumentException("Field [" + name() + "] of type [" + typeName() + "] doesn't support formats.");
594-
}
595-
return value.toString();
591+
public ValueFetcher valueFetcher(MapperService mapperService, String format) {
592+
throw new UnsupportedOperationException();
596593
}
597594

598595
@Override

modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/TokenCountFieldMapper.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,17 @@ protected void parseCreateField(ParseContext context) throws IOException {
159159
}
160160

161161
@Override
162-
protected String parseSourceValue(Object value, String format) {
162+
public ValueFetcher valueFetcher(MapperService mapperService, String format) {
163163
if (format != null) {
164164
throw new IllegalArgumentException("Field [" + name() + "] of type [" + typeName() + "] doesn't support formats.");
165165
}
166166

167-
return value.toString();
167+
return new SourceValueFetcher(name(), mapperService, parsesArrayValue(), nullValue) {
168+
@Override
169+
protected String parseSourceValue(Object value) {
170+
return value.toString();
171+
}
172+
};
168173
}
169174

170175
/**

0 commit comments

Comments
 (0)