### Elasticsearch Version

8.9.0+

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

all

### Problem Description

Beginning in 8.9.0, observing cardinality aggs returning zero against `constant_keyword` mapped fields.

### Steps to Reproduce

Performed simple setup of an index with `constant_keyword` mapping for field `test` in 8.8.2 and 8.9.0:

```json
PUT test-index
{
  "mappings": {
    "properties": {
      "test": {
        "type": "constant_keyword"
      }
    }
  }
}

PUT test-index/_bulk
{ "index" : { "_index" : "test-index", "_id" : "1" } }
{ "test" : "value1" }



GET test-index/_search
{
  "aggs": {
    "0": {
      "cardinality": {
        "field": "test"
      }
    }
  },
  "size": 0
}
```

8.8.2 result

```json
{
  "took": 1,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": null,
    "hits": []
  },
  "aggregations": {
    "0": {
      "value": 1 <= expected
    }
  }
}
```

8.9.0 result

```json
{
  "took": 2,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": null,
    "hits": []
  },
  "aggregations": {
    "0": {
      "value": 0 <= unexpected
    }
  }
}
```

Also see a zero value when querying `constant_keyword` values across indices:

```
# `test` already mapped as `constant_keyword` for `test-index-*`
PUT test-index/_bulk
{ "index" : { "_index" : "test-index-0001", "_id" : "1" } }
{ "test" : "value1" }
{ "index" : { "_index" : "test-index-0002", "_id" : "2" } }
{ "test" : "value2" }
{ "index" : { "_index" : "test-index-0003", "_id" : "3" } }
{ "test" : "value3" }
{ "index" : { "_index" : "test-index-0004", "_id" : "4" } }
{ "test" : "value4" }
{ "index" : { "_index" : "test-index-0005", "_id" : "5" } }
{ "test" : "value5" }



GET test-index-*/_search
{
  "aggs": {
    "0": {
      "cardinality": {
        "field": "test"
      }
    }
  },
  "size": 0
}
```

### Logs (if relevant)

_No response_
server/src/main/java/org/elasticsearch/search/aggregations/metrics/GlobalOrdCardinalityAggregator.java
final BytesRef value = values.lookupOrd(ord);
                    MurmurHash3.hash128(value.bytes, value.offset, value.length, 0, hash);
                    hashes.set(ord, hash.h1);
                }
            }
            for (long bucket = visitedOrds.size() - 1; bucket >= 0; --bucket) {
                try (BitArray bits = visitedOrds.get(bucket)) {
                    if (bits != null) {
                        visitedOrds.set(bucket, null); 
                        counts.ensureCapacity(bucket, bits.cardinality());
                        for (long ord = bits.nextSetBit(0); ord < Long.MAX_VALUE; ord = ord + 1 < maxOrd
                            ? bits.nextSetBit(ord + 1)
                            : Long.MAX_VALUE) {
                            counts.collect(bucket, hashes.get(ord));
                        }
                    }
                }
            }
            
            Releasables.close(visitedOrds);
            visitedOrds = null;
        }
    }
    @Override
    public double metric(long owningBucketOrd) {
        return counts.cardinality(owningBucketOrd);
    }
    @Override
    public InternalAggregation buildAggregation(long owningBucketOrdinal) {
        if (counts == null || owningBucketOrdinal >= counts.maxOrd() || counts.cardinality(owningBucketOrdinal) == 0) {