How to index heterogeneous JSON Array as value in Elastic Search

(Abhijit) #1

Can Elastic search index fields like

"key": [

if i try to ingest this data, i get this error Found unrecoverable error [Bad Request(400) - [WriteFailureException; nested: MapperParsingException[failed to parse [FIXMessage.key]]; nested: NumberFormatException[For input string: "somestring"]; ]]; Bailing out..

Please also refer to

(Christian Dahlqvist) #2

As pointed out in the answer on StackOverflow, the type of all elements in the array must be the same. If you have not provided an explicit mapping, Elasticsearch will determine the type based on the first value it sees, in this case a float, and that will make indexing the string fail.

(system) #3