I'm indexing products who have myriad of attributes with different types, my first iteration was to store the attributes as a nested type and put the attribute name in a field called key and the value in a field called value. This works fine, except the values are all strings. There is some desire to have the value as the type it was in the json document. What's the best way to map something like this?
Example:
attributes: {
color: 'red',
voltage: 12.0
portable: true
}