Skip to content

Commit 3036adf

Browse files
committed
Remove writeable
1 parent bad0585 commit 3036adf

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,4 @@ public abstract class IndexOptions implements ToXContent {
2222
public IndexOptions() {}
2323

2424
public abstract IndexOptions readFrom(StreamInput in) throws IOException;
25-
26-
public static IndexOptions readIndexOptions(StreamInput in) throws IOException {
27-
String className = in.readString(); // Read the class name from the input
28-
try {
29-
Class<?> clazz = Class.forName(className);
30-
IndexOptions instance = (IndexOptions) clazz.getConstructor().newInstance();
31-
return instance.readFrom(in);
32-
} catch (ReflectiveOperationException e) {
33-
throw new IOException("Failed to create instance of " + className, e);
34-
}
35-
}
3625
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import org.elasticsearch.ElasticsearchException;
1111
import org.elasticsearch.common.Strings;
12-
import org.elasticsearch.common.io.stream.StreamInput;
1312
import org.elasticsearch.common.xcontent.support.XContentMapValues;
1413
import org.elasticsearch.index.IndexVersion;
1514
import org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper;
@@ -43,11 +42,6 @@ public SemanticTextIndexOptions(SupportedIndexOptions type, IndexOptions indexOp
4342
this.indexOptions = indexOptions;
4443
}
4544

46-
public SemanticTextIndexOptions(StreamInput in) throws IOException {
47-
this.type = SupportedIndexOptions.fromValue(in.readString());
48-
this.indexOptions = IndexOptions.readIndexOptions(in);
49-
}
50-
5145
public SupportedIndexOptions type() {
5246
return type;
5347
}

0 commit comments

Comments
 (0)