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

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 :slight_smile:

Have a good week everyone!

--Alex

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.

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

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