MapperParsingException - Array


#1

How can I put a Nested type on my Mapping where a field has different types? Let me show you my nested:

{
    "array": [
    		{	
    			"name": "Date One",
    			"value": "2015-07-09"
    		},
    		{	
    			"name": "Date Two",
    			"value": "2017-07-09"
    		},
    		{	
    			"name": "Client",
    			"value": "John Smith"
    		},
    		{	
    			"name": "Contract",
    			"value": 1500.25
    		}
    	]
}

array.value can be a date, string or double type, is there a way of mapping my array.value to these 3 different types?


(Mark Walkom) #2

Nope, you need to define those as different field names.


#3

Even if they are array of objects?

Assuming it is about an array of objects, if I use multi_field, can I set the different types: string, date and double on Mapping?

Thanks in advance


(system) #4