Optional values are mapped,
inflated and deflated according to their content type,
eg Optional[Int].
An Optional type with no content type is mapped as <{ type = 'object',
enabled => 'no' }>> and the value would be passed through unaltered when deflating/inflating.

Because array refs are interpreted by Elasticsearch as multiple values of the same type,
tuples are converted to hash refs whose keys are the index number.
For instance,
a field foo with Tuple[Int,Str] and value [5,'foo'] will be deflated to { 0 => 5,
1 => 'foo' }.

A tuple is mapped as an object,
with:

{
type => 'object',
dynamic => 'strict',
properties => \%properties
}

The %properties mapping depends on the content types. A Tuple without content types is mapped as <{ type = 'object', enabled => 'no' }>> and the value would be passed through unaltered when deflating/inflating.

The %properties mapping depends on the content types. A Dict without content types is mapped as <{ type = 'object', enabled => 'no' }>> and the value would be passed through unaltered when deflating/inflating.

It is not advisable to allow arbitrary key names in indexed hashes, as you could end up generating many (and conflicting) field mappings. For this reason, Maps are mapped as { type => 'object', enabled => 0 }. In/deflation depends on the content type (eg Map[Str,Int]). A Map without a content type would pass through the value unaltered when inflating/deflatin.