Enable _size field in elasticsearch mapping?

Hi,
ES 2.4.0
I want to enable the _size field in elasticsearch mappings when i tried the following code

{
"test": {
"mappings": {
"type1": {
"_size": {
"enabled": true
}
}
}
}
}

it is showing error like this

{
"error": {
"root_cause": [
{
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: mapping type is missing;"
}
],
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: mapping type is missing;"
},
"status": 400
}

hey,
i got the right syntax

PUT my_index
{
"my_type": {
"_size": {
"enabled": true,
"store": "true"
}
}
}

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