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
/*
     * NOTE: IntelliJ lies!
     * This map is used during class construction, referenced by the registerTransportVersion method.
     * When all the transport version constants have been registered, the map is cleared & never touched again.
     */
    static TreeSet<Integer> IDS = new TreeSet<>();
    static TransportVersion def(int id) {
        if (IDS == null) throw new IllegalStateException("The IDS map needs to be present to call this method");
        if (IDS.add(id) == false) {
            throw new IllegalArgumentException("Version id " + id + " defined twice");
        }
        if (id < IDS.last()) {
            throw new IllegalArgumentException("Version id " + id + " is not defined in the right location. Keep constants sorted");
        }
        return new TransportVersion(id);
    }
    public static final TransportVersion ZERO = def(0);
    public static final TransportVersion V_7_0_0 = def(7_00_00_99);
    public static final TransportVersion V_7_0_1 = def(7_00_01_99);
    public static final TransportVersion V_7_1_0 = def(7_01_00_99);