### Elasticsearch Version

Elasticsearch 8.0.0 running from docker image

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Elasticsearch docker

### Problem Description

When sending a bulk index request to Elasticsearch 8.0.0 with the compatibility headers set for a client version 7, the bulk response is missing the `_type` property in the index answer. This causes the client failing to parse the response.

```
Unable to parse response body for Response{requestLine=POST /_bulk?timeout=1m HTTP/1.1, host=http://localhost:9200, response=HTTP/1.1 200 OK}] with root cause

java.lang.NullPointerException: null
	at java.base/java.util.Objects.requireNonNull(Objects.java:208) ~[na:na]
	at org.elasticsearch.action.DocWriteResponse.<init>(DocWriteResponse.java:116) ~[elasticsearch-7.15.2.jar:7.15.2]
	at org.elasticsearch.action.index.IndexResponse.<init>(IndexResponse.java:43) ~[elasticsearch-7.15.2.jar:7.15.2]
	at org.elasticsearch.action.index.IndexResponse.<init>(IndexResponse.java:28) ~[elasticsearch-7.15.2.jar:7.15.2]
	at org.elasticsearch.action.index.IndexResponse$Builder.build(IndexResponse.java:96) ~[elasticsearch-7.15.2.jar:7.15.2]
	at org.elasticsearch.action.index.IndexResponse$Builder.build(IndexResponse.java:93) ~[elasticsearch-7.15.2.jar:7.15.2]
	at org.elasticsearch.action.bulk.BulkItemResponse.fromXContent(BulkItemResponse.java:148) ~[elasticsearch-7.15.2.jar:7.15.2]
	at org.elasticsearch.action.bulk.BulkResponse.fromXContent(BulkResponse.java:177) ~[elasticsearch-7.15.2.jar:7.15.2]
	at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:2011) ~[elasticsearch-rest-high-level-client-7.15.2.jar:7.15.2]
	at org.elasticsearch.client.RestHighLevelClient.lambda$performRequestAndParseEntity$8(RestHighLevelClient.java:1673) ~[elasticsearch-rest-high-level-client-7.15.2.jar:7.15.2]
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1749) ~[elasticsearch-rest-high-level-client-7.15.2.jar:7.15.2]
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1702) ~[elasticsearch-rest-high-level-client-7.15.2.jar:7.15.2]
	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1672) ~[elasticsearch-rest-high-level-client-7.15.2.jar:7.15.2]
	at org.elasticsearch.client.RestHighLevelClient.bulk(RestHighLevelClient.java:577) ~[elasticsearch-rest-high-level-client-7.15.2.jar:7.15.2]
```

### Steps to Reproduce

send a bulk index request with the `RestHighLevelClient` 7.15.2 to the cluster

```
POST http://localhost:9200/_bulk?timeout=1m HTTP/1.1
Accept: application/vnd.elasticsearch+json;compatible-with=7
Content-Type: application/vnd.elasticsearch+json;compatible-with=7
Authorization: Basic *****
Content-Length: 121
Host: localhost:9200
Proxy-Connection: Keep-Alive
User-Agent: elasticsearch-java/7.15.2-SNAPSHOT (Java/17.0.2)
X-Elastic-Client-Meta: es=7.15.2-SNAPSHOT,jv=17,t=7.15.2-SNAPSHOT,hc=4.1.5
```
```
{"index":{"_index":"entities","_id":"1"}}
{"id":"1","text":"text-1"}
```
This will return
```
HTTP/1.1 200 OK
X-elastic-product: Elasticsearch
content-type: application/vnd.elasticsearch+json;compatible-with=7
content-length: 202
```
```
{"took":13,"errors":false,"items":[{"index":{"_index":"entities","_id":"1","_version":5,"result":"updated","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":40,"_primary_term":3,"status":200}}]}
```
When sending the same request to Elasticsearch 7.17.0 the following body is returned>
```
{"took":456,"errors":false,"items":[{"index":{"_index":"entities","_type":"_doc","_id":"1","_version":2,"result":"updated","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":10,"_primary_term":2,"status":200}}]}
```

Here the `_type` field is returned which is missing in the response from 8.0.0 .

Btw, when not using bulk, but a normal index for a single document, then the `_type` is returned, it 's misisng in the bulk response.

### Logs (if relevant)

_No response_
server/src/main/java/org/elasticsearch/action/DocWriteResponse.java
Result(int op) {
            this.op = (byte) op;
            this.lowercase = this.name().toLowerCase(Locale.ROOT);
        }
        public byte getOp() {
            return op;
        }
        public String getLowercase() {
            return lowercase;
        }
        public static Result readFrom(StreamInput in) throws IOException {
            Byte opcode = in.readByte();
            return switch (opcode) {
                case 0 -> CREATED;
                case 1 -> UPDATED;
                case 2 -> DELETED;
                case 3 -> NOT_FOUND;
                case 4 -> NOOP;
                default -> throw new IllegalArgumentException("Unknown result code: " + opcode);
            };
        }
        @Override
        public void writeTo(StreamOutput out) throws IOException {
            out.writeByte(op);
        }
    }
    private final ShardId shardId;
    private final String id;
    private final long version;
    private final long seqNo;