Mapping subtypes with array of different objects (polymorphism)

I want to map my subclass's polymorphic objects into elasticsearch.

Its array of objects. its also having field "value" which either be float in case of temperature and boolean in case of digital signal.

Can anyone help me to map this kind of fields mapping in elasticsearch template?

"SignalList":[  
                {
                    "value" : { "type" :"float"}, // temperature field
                    "SignalType" :{"type": "string"}      
                },
                {
                    "value" : { "type" :"boolean"}, //digital field 
                    "SignalType" :{"type": "string"}      
                },
                {
                    "location" : { "type" :"geo_point"},
                    "Latitude" : { "type" : "float" },
                    "Longitude" : { "type" : "float" },
                    "SignalType" :{"type": "string"}      
                }
                ]

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.