While experimenting with painless tests in a multi-node cluster I hit the following error. We're failing to serialize this type, which looks to be because it's not implementing `GenericNamedWritable` when it should.

```
[2023-10-19T01:22:02,328][WARN ][o.e.t.OutboundHandler    ] [search-MxNysuL] failed to serialize outbound message [Response{821}{false}{false}{false}{class org.elasticsearch.search.fetch.QueryFetchSearchResult}] java.lang.IllegalArgumentException: can not write type [class org.elasticsearch.script.field.IPAddress]
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.io.stream.StreamOutput.writeGenericValue(StreamOutput.java:839)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.io.stream.StreamOutput.writeCollection(StreamOutput.java:1050)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.document.DocumentField.writeTo(DocumentField.java:116)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.io.stream.StreamOutput.writeWriteable(StreamOutput.java:981)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.io.stream.StreamOutput.writeMap(StreamOutput.java:602)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.common.io.stream.StreamOutput.writeMap(StreamOutput.java:610)
	at org.elasticsearch.server@8.12.0-SNAPSHOT/org.elasticsearch.search.SearchHit.writeTo(SearchHit.java:267)
```
server/src/main/java/org/elasticsearch/TransportVersions.java
TransportVersion version;
                try {
                    version = (TransportVersion) declaredField.get(null);
                } catch (IllegalAccessException e) {
                    throw new AssertionError(e);
                }
                builder.put(version.id(), version);
                if (Assertions.ENABLED) {
                    // 
                    var sameVersionNumber = versionIdFields.put(version.id(), fieldName);
                    assert sameVersionNumber == null
                        : "Versions ["
                            + sameVersionNumber
                            + "] and ["
                            + fieldName
                            + "] have the same version number ["
                            + version.id()
                            + "]. Each TransportVersion should have a different version number";
                }
            }
        }
        return Collections.unmodifiableNavigableMap(builder);
    }
    static Collection<TransportVersion> getAllVersions() {
        return VERSION_IDS.values();
    }
    // 
    private TransportVersions() {}
}