Error writing array of objects?

Hello, I am trying to create mapping for the array of objects:
"my_vector" : [
{
"my_id": "2c5f056d-4ab9-4aff-85b6-be16a6d26fb2",
"my_name": "test1",
"my_value": [
{
"name": "state",
"value": 0,
"cc_value": 0.81
},
{
"name": "test2",
"value": 0,
"cc_value": 0.71
}
]
}
I used map "my_vector":{"type": "keyword"} to create index with mappings, but when I try to create type with real data, i have the following error:
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse [my_vector]"}],"type":"mapper_parsing_exception","reason":"failed to parse [my_vector]","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:83"}}
What the mapping for array should look like? Thanks....

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