# Mapping: Allowing to load booleans eagerly as global ordinals like keyword

**URL:** https://discuss.elastic.co/t/mapping-allowing-to-load-booleans-eagerly-as-global-ordinals-like-keyword/375723
**Category:** Elasticsearch
**Created:** [March 11, 2025, 4:03pm UTC](https://discuss.elastic.co/t/mapping-allowing-to-load-booleans-eagerly-as-global-ordinals-like-keyword/375723 "2025-03-11T16:03:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [March 11, 2025, 4:03pm UTC](https://discuss.elastic.co/t/mapping-allowing-to-load-booleans-eagerly-as-global-ordinals-like-keyword/375723/1 "2025-03-11T16:03:10Z")

</div>

Hey,

keywords can be configured to be loaded eagerly as global ordinals in the mapping. This is important to not run into delays if a query hits a segment for first time.

I've been wondering if such an option should also exist for the boolean field type. I am not sure how a boolean is stored, but if it is keyword like as a term, would it make sense to also load it eagerly or am I missing something?

Appreciate any help to my confusion 🙂

Have a good week everyone!

--Alex

---

<div class="post-metadata">

### Author: ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)
#### Post date: [June 17, 2025, 8:36am UTC](https://discuss.elastic.co/t/mapping-allowing-to-load-booleans-eagerly-as-global-ordinals-like-keyword/375723/2 "2025-06-17T08:36:21Z")

</div>

Maybe `index.store.preload` as the closest concept?

But I don't think a boolean has the same ordinal mapping that the global ordinals solve, so I'm not sure there's really an equivalent for this.

---

<div class="post-metadata">

### Author: ![Mikhail\_Khludnev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikhail_khludnev/32/59591_2.png) [@Mikhail\_Khludnev](https://discuss.elastic.co/u/Mikhail_Khludnev)
#### Post date: [June 17, 2025, 2:46pm UTC](https://discuss.elastic.co/t/mapping-allowing-to-load-booleans-eagerly-as-global-ordinals-like-keyword/375723/3 "2025-06-17T14:46:00Z")

</div>

I don't think it's applicable in any sense.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [June 20, 2025, 7:32am UTC](https://discuss.elastic.co/t/mapping-allowing-to-load-booleans-eagerly-as-global-ordinals-like-keyword/375723/4 "2025-06-20T07:32:19Z")

</div>

So my understanding so far:

1. A boolean is stored as a string, either `T` or `F`
2. Loading the global ordinals for a boolean is much faster, because the cardinality is much lower
3. Because this cannot be configured to be loaded before the first query needs a fresh segment, you still can run into slowdowns at query time - how big those are I have no idea.

--Alex
