Skip to content

Commit 2152926

Browse files
committed
Cleanup
1 parent 66d65b5 commit 2152926

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.elasticsearch.common.xcontent.XContentParserUtils;
1414
import org.elasticsearch.common.xcontent.support.XContentMapValues;
1515
import org.elasticsearch.core.Nullable;
16-
import org.elasticsearch.index.IndexVersion;
1716
import org.elasticsearch.index.IndexVersions;
1817
import org.elasticsearch.inference.ChunkedInference;
1918
import org.elasticsearch.inference.ChunkingSettings;
@@ -105,7 +104,7 @@ public static String getOffsetsFieldName(String fieldName) {
105104
return getChunksFieldName(fieldName) + "." + CHUNKED_OFFSET_FIELD;
106105
}
107106

108-
record ParserContext(boolean useLegacyFormat, String fieldName, IndexVersion indexVersion, XContentType xContentType) {}
107+
record ParserContext(boolean useLegacyFormat, String fieldName, XContentType xContentType) {}
109108

110109
static SemanticTextField parse(XContentParser parser, ParserContext context) throws IOException {
111110
return SEMANTIC_TEXT_FIELD_PARSER.parse(parser, context);

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -528,12 +528,7 @@ SemanticTextField parseSemanticTextField(DocumentParserContext context) throws I
528528
context.path().setWithinLeafObject(true);
529529
return SemanticTextField.parse(
530530
context.parser(),
531-
new SemanticTextField.ParserContext(
532-
fieldType().useLegacyFormat,
533-
fullPath(),
534-
context.indexSettings().getIndexVersionCreated(),
535-
context.parser().contentType()
536-
)
531+
new SemanticTextField.ParserContext(fieldType().useLegacyFormat, fullPath(), context.parser().contentType())
537532
);
538533
} finally {
539534
context.path().setWithinLeafObject(isWithinLeaf);

0 commit comments

Comments
 (0)