Skip to content

Commit a64c65f

Browse files
fix lint issues
1 parent 7da5bd6 commit a64c65f

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -363,22 +363,21 @@ public Builder indexOptions(IndexOptions indexOptions) {
363363

364364
@Override
365365
public DenseVectorFieldMapper build(MapperBuilderContext context) {
366-
DenseVectorFieldType denseVectorFieldType = new DenseVectorFieldType(
367-
context.buildFullName(leafName()),
368-
indexVersionCreated,
369-
elementType.getValue(),
370-
dims.getValue(),
371-
indexed.getValue(),
372-
similarity.getValue(),
373-
indexOptions.getValue(),
374-
meta.getValue()
375-
);
376366
// Validate again here because the dimensions or element type could have been set programmatically,
377367
// which affects index option validity
378368
validate();
379369
return new DenseVectorFieldMapper(
380370
leafName(),
381-
denseVectorFieldType,
371+
new DenseVectorFieldType(
372+
context.buildFullName(leafName()),
373+
indexVersionCreated,
374+
elementType.getValue(),
375+
dims.getValue(),
376+
indexed.getValue(),
377+
similarity.getValue(),
378+
indexOptions.getValue(),
379+
meta.getValue()
380+
),
382381
builderParams(this, context),
383382
indexOptions.getValue(),
384383
indexVersionCreated

server/src/main/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapper.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,11 @@ protected Parameter<?>[] getParameters() {
9090

9191
@Override
9292
public SparseVectorFieldMapper build(MapperBuilderContext context) {
93-
SparseVectorFieldType sparseVectorFieldType = new SparseVectorFieldType(
94-
context.buildFullName(leafName()),
95-
stored.getValue(),
96-
meta.getValue()
93+
return new SparseVectorFieldMapper(
94+
leafName(),
95+
new SparseVectorFieldType(context.buildFullName(leafName()), stored.getValue(), meta.getValue()),
96+
builderParams(this, context)
9797
);
98-
return new SparseVectorFieldMapper(leafName(), sparseVectorFieldType, builderParams(this, context));
9998
}
10099
}
101100

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/mapper/OffsetSourceFieldMapper.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ protected Parameter<?>[] getParameters() {
119119

120120
@Override
121121
public OffsetSourceFieldMapper build(MapperBuilderContext context) {
122-
OffsetSourceFieldType fieldType = new OffsetSourceFieldType(context.buildFullName(leafName()), charset.get(), meta.getValue());
123-
124-
return new OffsetSourceFieldMapper(leafName(), fieldType, builderParams(this, context));
122+
return new OffsetSourceFieldMapper(
123+
leafName(),
124+
new OffsetSourceFieldType(context.buildFullName(leafName()), charset.get(), meta.getValue()),
125+
builderParams(this, context)
126+
);
125127
}
126128
}
127129

0 commit comments

Comments
 (0)