### Elasticsearch Version

8.10.3

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

docker

### Problem Description

Cannot sort by field if there are blank values
{
  "name": "es-1-master-2",
  "cluster_name": "es-1",
  "cluster_uuid": "kQ8-xy6FQeqjR8Zmc_a9HQ",
  "version": {
    "number": "8.10.3",
    "build_flavor": "default",
    "build_type": "docker",
    "build_hash": "c63272efed16b5a1c25f3ce500715b7fddf9a9fb",
    "build_date": "2023-10-05T10:15:55.152563867Z",
    "build_snapshot": false,
    "lucene_version": "9.7.0",
    "minimum_wire_compatibility_version": "7.17.0",
    "minimum_index_compatibility_version": "7.0.0"
  },
  "tagline": "You Know, for Search"
}

### Steps to Reproduce

Steps to recreate issue.
From kibana add sample data sets ['Sample flight data','Sample eCommerce orders']
Create dataview
name:test
index patter:kibana_*
timefield: --- I don't want to use the time filter ---

From discover sort by AvgTicketPrice, or run query
```
POST kibana_*/_search
{
    "sort": [
        {
            "AvgTicketPrice": {
                "order": "desc",
                "unmapped_type": "boolean"
            }
        }
    ],
    "fields": [
        {
            "field": "*",
            "include_unmapped": "true"
        }
    ],
    "size": 500
}
```
Can't sort on field [AvgTicketPrice]; the field has incompatible sort types: [LONG] and [FLOAT] across shards!

### Logs (if relevant)

_No response_
server/src/internalClusterTest/java/org/elasticsearch/search/sort/FieldSortIT.java
response -> {
                    assertThat(response.getHits().getTotalHits().value, equalTo((long) sparseBytes.size()));
                    assertThat(response.getHits().getHits().length, equalTo(size));
                    Set<Entry<BytesRef, String>> entrySet = sparseBytes.entrySet();
                    Iterator<Entry<BytesRef, String>> iterator = entrySet.iterator();
                    for (int i = 0; i < size; i++) {
                        assertThat(iterator.hasNext(), equalTo(true));
                        Entry<BytesRef, String> next = iterator.next();
                        assertThat(response.getHits().getAt(i).getId(), equalTo(next.getValue()));
                        assertThat(response.getHits().getAt(i).getSortValues()[0].toString(), equalTo(next.getKey().utf8ToString()));
                    }
                }
            );
        }
    }
    public void test3078() {
        assertAcked(indicesAdmin().prepareCreate("test").setMapping("field", "type=keyword").get());
        ensureGreen();
        for (int i = 1; i < 101; i++) {
            prepareIndex("test").setId(Integer.toString(i)).setSource("field", Integer.toString(i)).get();
        }
        refresh();
        assertResponse(
            prepareSearch("test").setQuery(matchAllQuery()).addSort(SortBuilders.fieldSort("field").order(SortOrder.ASC)),
            response -> {
                assertThat(response.getHits().getAt(0).getSortValues()[0].toString(), equalTo("1"));
                assertThat(response.getHits().getAt(1).getSortValues()[0].toString(), equalTo("10"));
                assertThat(response.getHits().getAt(2).getSortValues()[0].toString(), equalTo("100"));
            }
        );