Skip to content

Commit b5b92db

Browse files
Merge branch 'main' into tasks/rcs-rm-isCrossClusterSearchEnabled
2 parents 82f59e2 + 83faed6 commit b5b92db

File tree

7 files changed

+25
-29
lines changed

7 files changed

+25
-29
lines changed

build-tools-internal/src/integTest/resources/org/elasticsearch/gradle/internal/fake_git/remote/settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ include ":distribution:bwc:bugfix"
1313
include ":distribution:bwc:bugfix2"
1414
include ":distribution:bwc:bugfix3"
1515
include ":distribution:bwc:bugfix4"
16+
include ":distribution:bwc:bugfix5"
1617
include ":distribution:bwc:minor"
1718
include ":distribution:bwc:major"
1819
include ":distribution:bwc:staged"

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ allprojects {
329329
dependsOn ":distribution:bwc:bugfix2:buildBwcLinuxTar"
330330
dependsOn ":distribution:bwc:bugfix3:buildBwcLinuxTar"
331331
dependsOn ":distribution:bwc:bugfix4:buildBwcLinuxTar"
332+
dependsOn ":distribution:bwc:bugfix5:buildBwcLinuxTar"
332333
dependsOn ":distribution:bwc:minor:buildBwcLinuxTar"
333334
dependsOn ":distribution:bwc:staged:buildBwcLinuxTar"
334335
dependsOn ":distribution:bwc:staged2:buildBwcLinuxTar"

distribution/bwc/bugfix5/build.gradle

Whitespace-only changes.

muted-tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,21 @@ tests:
530530
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
531531
method: test {p0=transform/transforms_crud/Test transform where source query is invalid}
532532
issue: https://github.com/elastic/elasticsearch/issues/132111
533+
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldIndexTypeUpdateIT
534+
method: testDenseVectorMappingUpdate {initialType=bbq_flat updateType=bbq_hnsw}
535+
issue: https://github.com/elastic/elasticsearch/issues/132112
536+
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldIndexTypeUpdateIT
537+
method: testDenseVectorMappingUpdate {initialType=hnsw updateType=int4_hnsw}
538+
issue: https://github.com/elastic/elasticsearch/issues/132113
539+
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldIndexTypeUpdateIT
540+
method: testDenseVectorMappingUpdate {initialType=hnsw updateType=bbq_hnsw}
541+
issue: https://github.com/elastic/elasticsearch/issues/132115
542+
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldIndexTypeUpdateIT
543+
method: testDenseVectorMappingUpdate {initialType=int8_flat updateType=int8_hnsw}
544+
issue: https://github.com/elastic/elasticsearch/issues/132116
545+
- class: org.elasticsearch.index.mapper.vectors.DenseVectorFieldIndexTypeUpdateIT
546+
method: testDenseVectorMappingUpdate {initialType=int4_flat updateType=int8_hnsw}
547+
issue: https://github.com/elastic/elasticsearch/issues/132117
533548

534549
# Examples:
535550
#

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ List projects = [
8080
'distribution:bwc:bugfix2',
8181
'distribution:bwc:bugfix3',
8282
'distribution:bwc:bugfix4',
83+
'distribution:bwc:bugfix5',
8384
'distribution:bwc:maintenance',
8485
'distribution:bwc:minor',
8586
'distribution:bwc:staged',

x-pack/plugin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb/patternedtext/PatternedTextFieldMapper.java

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
import java.util.List;
3434
import java.util.Map;
3535

36-
import static org.elasticsearch.index.IndexSettings.USE_DOC_VALUES_SKIPPER;
37-
3836
/**
3937
* A {@link FieldMapper} that assigns every document the same value.
4038
*/
@@ -62,25 +60,12 @@ public static class Builder extends FieldMapper.Builder {
6260
private final IndexSettings indexSettings;
6361
private final Parameter<Map<String, String>> meta = Parameter.metaParam();
6462
private final TextParams.Analyzers analyzers;
65-
private final boolean enableDocValuesSkipper;
6663

6764
public Builder(String name, MappingParserContext context) {
68-
this(
69-
name,
70-
context.indexVersionCreated(),
71-
context.getIndexSettings(),
72-
context.getIndexAnalyzers(),
73-
USE_DOC_VALUES_SKIPPER.get(context.getSettings())
74-
);
65+
this(name, context.indexVersionCreated(), context.getIndexSettings(), context.getIndexAnalyzers());
7566
}
7667

77-
public Builder(
78-
String name,
79-
IndexVersion indexCreatedVersion,
80-
IndexSettings indexSettings,
81-
IndexAnalyzers indexAnalyzers,
82-
boolean enableDocValuesSkipper
83-
) {
68+
public Builder(String name, IndexVersion indexCreatedVersion, IndexSettings indexSettings, IndexAnalyzers indexAnalyzers) {
8469
super(name);
8570
this.indexCreatedVersion = indexCreatedVersion;
8671
this.indexSettings = indexSettings;
@@ -90,7 +75,6 @@ public Builder(
9075
m -> ((PatternedTextFieldMapper) m).positionIncrementGap,
9176
indexCreatedVersion
9277
);
93-
this.enableDocValuesSkipper = enableDocValuesSkipper;
9478
}
9579

9680
@Override
@@ -120,8 +104,8 @@ public PatternedTextFieldMapper build(MapperBuilderContext context) {
120104
patternedTextFieldType.templateIdFieldName(),
121105
indexSettings.getMode(),
122106
indexCreatedVersion,
123-
enableDocValuesSkipper
124-
).build(context);
107+
true
108+
).indexed(false).build(context);
125109
return new PatternedTextFieldMapper(leafName(), patternedTextFieldType, builderParams, this, templateIdMapper);
126110
}
127111
}
@@ -132,7 +116,6 @@ public PatternedTextFieldMapper build(MapperBuilderContext context) {
132116
private final IndexAnalyzers indexAnalyzers;
133117
private final IndexSettings indexSettings;
134118
private final NamedAnalyzer indexAnalyzer;
135-
private final boolean enableDocValuesSkipper;
136119
private final int positionIncrementGap;
137120
private final FieldType fieldType;
138121
private final KeywordFieldMapper templateIdMapper;
@@ -152,7 +135,6 @@ private PatternedTextFieldMapper(
152135
this.indexAnalyzers = builder.analyzers.indexAnalyzers;
153136
this.indexAnalyzer = builder.analyzers.getIndexAnalyzer();
154137
this.indexSettings = builder.indexSettings;
155-
this.enableDocValuesSkipper = builder.enableDocValuesSkipper;
156138
this.positionIncrementGap = builder.analyzers.positionIncrementGap.getValue();
157139
this.templateIdMapper = templateIdMapper;
158140
}
@@ -164,7 +146,7 @@ public Map<String, NamedAnalyzer> indexAnalyzers() {
164146

165147
@Override
166148
public FieldMapper.Builder getMergeBuilder() {
167-
return new Builder(leafName(), indexCreatedVersion, indexSettings, indexAnalyzers, enableDocValuesSkipper).init(this);
149+
return new Builder(leafName(), indexCreatedVersion, indexSettings, indexAnalyzers).init(this);
168150
}
169151

170152
@Override

x-pack/plugin/logsdb/src/test/java/org/elasticsearch/xpack/logsdb/patternedtext/PatternedTextFieldMapperTests.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.elasticsearch.common.Strings;
2525
import org.elasticsearch.common.settings.Settings;
2626
import org.elasticsearch.core.Tuple;
27-
import org.elasticsearch.index.IndexSettings;
2827
import org.elasticsearch.index.mapper.DateFieldMapper;
2928
import org.elasticsearch.index.mapper.DocumentMapper;
3029
import org.elasticsearch.index.mapper.KeywordFieldMapper;
@@ -131,10 +130,7 @@ protected void minimalStoreMapping(XContentBuilder b) throws IOException {
131130
}
132131

133132
public void testDefaults() throws IOException {
134-
boolean enabledDocValuesSkipper = randomBoolean();
135-
var indexSettings = getIndexSettingsBuilder().put(IndexSettings.USE_DOC_VALUES_SKIPPER.getKey(), enabledDocValuesSkipper).build();
136-
137-
DocumentMapper mapper = createMapperService(indexSettings, fieldMapping(this::minimalMapping)).documentMapper();
133+
DocumentMapper mapper = createMapperService(fieldMapping(this::minimalMapping)).documentMapper();
138134
assertEquals(Strings.toString(fieldMapping(this::minimalMapping)), mapper.mappingSource().toString());
139135

140136
ParsedDocument doc = mapper.parse(source(b -> b.field("field", "1234")));
@@ -162,7 +158,7 @@ public void testDefaults() throws IOException {
162158
assertThat(fieldType.omitNorms(), equalTo(true));
163159
assertFalse(fieldType.tokenized());
164160
assertFalse(fieldType.stored());
165-
assertThat(fieldType.indexOptions(), equalTo(enabledDocValuesSkipper ? IndexOptions.NONE : IndexOptions.DOCS));
161+
assertThat(fieldType.indexOptions(), equalTo(IndexOptions.NONE));
166162
assertThat(fieldType.storeTermVectors(), equalTo(false));
167163
assertThat(fieldType.storeTermVectorOffsets(), equalTo(false));
168164
assertThat(fieldType.storeTermVectorPositions(), equalTo(false));

0 commit comments

Comments
 (0)