@@ -1342,15 +1342,6 @@ final boolean validateElementType(ElementType elementType, boolean throwOnError)
13421342 return validElementType ;
13431343 }
13441344
1345- @ Override
1346- public void writeTo (StreamOutput out ) throws IOException {
1347- super .writeTo (out );
1348- out .writeEnum (type );
1349- doWriteTo (out );
1350- }
1351-
1352- protected abstract void doWriteTo (StreamOutput out ) throws IOException ;
1353-
13541345 public abstract boolean updatableTo (DenseVectorIndexOptions update );
13551346
13561347 public boolean validateDimension (int dim ) {
@@ -1403,13 +1394,6 @@ abstract static class QuantizedIndexOptions extends DenseVectorIndexOptions {
14031394 super (in );
14041395 this .rescoreVector = in .readOptionalWriteable (RescoreVector ::new );
14051396 }
1406-
1407- @ Override
1408- public void writeTo (StreamOutput out ) throws IOException {
1409- super .writeTo (out );
1410- out .writeOptionalWriteable (rescoreVector );
1411- doWriteTo (out );
1412- }
14131397 }
14141398
14151399 public enum VectorIndexType {
@@ -1742,12 +1726,6 @@ public IndexOptions readFrom(StreamInput in) throws IOException {
17421726 return new Int8FlatIndexOptions (in );
17431727 }
17441728
1745- @ Override
1746- public void doWriteTo (StreamOutput out ) throws IOException {
1747- super .writeTo (out );
1748- out .writeOptionalFloat (confidenceInterval );
1749- }
1750-
17511729 @ Override
17521730 public XContentBuilder toXContent (XContentBuilder builder , Params params ) throws IOException {
17531731 builder .startObject ();
@@ -1804,11 +1782,6 @@ public IndexOptions readFrom(StreamInput in) throws IOException {
18041782 return new FlatIndexOptions (in );
18051783 }
18061784
1807- @ Override
1808- public void doWriteTo (StreamOutput out ) throws IOException {
1809- // no additional fields to write
1810- }
1811-
18121785 @ Override
18131786 public XContentBuilder toXContent (XContentBuilder builder , Params params ) throws IOException {
18141787 builder .startObject ();
@@ -1867,14 +1840,6 @@ public IndexOptions readFrom(StreamInput in) throws IOException {
18671840 return new Int4HnswIndexOptions (in );
18681841 }
18691842
1870- @ Override
1871- public void doWriteTo (StreamOutput out ) throws IOException {
1872- super .writeTo (out );
1873- out .writeInt (m );
1874- out .writeInt (efConstruction );
1875- out .writeFloat (confidenceInterval );
1876- }
1877-
18781843 @ Override
18791844 public KnnVectorsFormat getVectorsFormat (ElementType elementType ) {
18801845 assert elementType == ElementType .FLOAT ;
@@ -1957,11 +1922,6 @@ public IndexOptions readFrom(StreamInput in) throws IOException {
19571922 return new Int4FlatIndexOptions (in );
19581923 }
19591924
1960- @ Override
1961- public void doWriteTo (StreamOutput out ) throws IOException {
1962- out .writeFloat (confidenceInterval );
1963- }
1964-
19651925 @ Override
19661926 public KnnVectorsFormat getVectorsFormat (ElementType elementType ) {
19671927 assert elementType == ElementType .FLOAT ;
@@ -2033,13 +1993,6 @@ public IndexOptions readFrom(StreamInput in) throws IOException {
20331993 return new Int8HnswIndexOptions (in );
20341994 }
20351995
2036- @ Override
2037- public void doWriteTo (StreamOutput out ) throws IOException {
2038- out .writeInt (m );
2039- out .writeInt (efConstruction );
2040- out .writeFloat (confidenceInterval );
2041- }
2042-
20431996 @ Override
20441997 public KnnVectorsFormat getVectorsFormat (ElementType elementType ) {
20451998 assert elementType == ElementType .FLOAT ;
@@ -2132,12 +2085,6 @@ public IndexOptions readFrom(StreamInput in) throws IOException {
21322085 return new HnswIndexOptions (in );
21332086 }
21342087
2135- @ Override
2136- public void doWriteTo (StreamOutput out ) throws IOException {
2137- out .writeInt (m );
2138- out .writeInt (efConstruction );
2139- }
2140-
21412088 @ Override
21422089 public KnnVectorsFormat getVectorsFormat (ElementType elementType ) {
21432090 if (elementType == ElementType .BIT ) {
@@ -2209,12 +2156,6 @@ public IndexOptions readFrom(StreamInput in) throws IOException {
22092156 return new BBQHnswIndexOptions (in );
22102157 }
22112158
2212- @ Override
2213- public void doWriteTo (StreamOutput out ) throws IOException {
2214- out .writeInt (m );
2215- out .writeInt (efConstruction );
2216- }
2217-
22182159 @ Override
22192160 KnnVectorsFormat getVectorsFormat (ElementType elementType ) {
22202161 assert elementType == ElementType .FLOAT ;
@@ -2278,11 +2219,6 @@ public IndexOptions readFrom(StreamInput in) throws IOException {
22782219 return new BBQFlatIndexOptions (in );
22792220 }
22802221
2281- @ Override
2282- public void doWriteTo (StreamOutput out ) throws IOException {
2283- // no additional fields to write
2284- }
2285-
22862222 @ Override
22872223 KnnVectorsFormat getVectorsFormat (ElementType elementType ) {
22882224 assert elementType == ElementType .FLOAT ;
@@ -2349,13 +2285,6 @@ public IndexOptions readFrom(StreamInput in) throws IOException {
23492285 return new BBQIVFIndexOptions (in );
23502286 }
23512287
2352- @ Override
2353- public void doWriteTo (StreamOutput out ) throws IOException {
2354- super .writeTo (out );
2355- out .writeVInt (clusterSize );
2356- out .writeVInt (defaultNProbe );
2357- }
2358-
23592288 @ Override
23602289 KnnVectorsFormat getVectorsFormat (ElementType elementType ) {
23612290 assert elementType == ElementType .FLOAT ;
@@ -2979,19 +2908,6 @@ public FieldMapper.Builder getMergeBuilder() {
29792908 return new Builder (leafName (), indexCreatedVersion ).init (this );
29802909 }
29812910
2982- @ Override
2983- public void doValidate (MappingLookup mappers ) {
2984- if (indexOptions instanceof BBQIVFIndexOptions && mappers .nestedLookup ().getNestedParent (fullPath ()) != null ) {
2985- throw new IllegalArgumentException (
2986- "["
2987- + CONTENT_TYPE
2988- + "] fields with index type ["
2989- + indexOptions .type
2990- + "] cannot be indexed if they're within [nested] mappings"
2991- );
2992- }
2993- }
2994-
29952911 private static DenseVectorIndexOptions parseIndexOptions (String fieldName , Object propNode , IndexVersion indexVersion ) {
29962912 @ SuppressWarnings ("unchecked" )
29972913 Map <String , ?> indexOptionsMap = (Map <String , ?>) propNode ;
0 commit comments