Root mapping definition has unsupported parameters: [_size : {enabled=true}]

Hello,
I have installed ES 6.5.4 in my cluster. Also installed Size plugin 6.5.4. After restarting the cluster, tried creating an index with mappings as follows:

PUT test_index/
{
 "mappings": {  "my_type": {
         "_size": {
        "enabled": true
    },
    "properties": {
    "field1": {
        "type": "keyword"
      }
    }
   }
 }
}

But I got following error.

{
   "error": {
      "root_cause": [
     {
        "type": "mapper_parsing_exception",
        "reason": "Root mapping definition has unsupported parameters:  [_size : {enabled=true}]"
     }
  ],
  "type": "mapper_parsing_exception",
  "reason": "Failed to parse mapping [unified]: Root mapping definition has unsupported parameters:  [_size : {enabled=true}]",
  "caused_by": {
     "type": "mapper_parsing_exception",
     "reason": "Root mapping definition has unsupported parameters:  [_size : {enabled=true}]"
  }
   },
   "status": 400
}

Any help would be greatly appreciated.

You need to install the mapper-size plugin.

sudo bin/elasticsearch-plugin install mapper-size

Then restart elasticsearch and you should be able to enable the _size field.

Hi Ryan,
Thanks for the reply. I had already installed mapper-size plugin and restarted elasticsearch. But still I am getting the above error while trying to create the index.

Do you have the plugin installed on every node in your cluster? Could you please check the installed plugins? https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html

Hi Ryan,
Yes, The plugin has been installed in all 40 nodes of the cluster.

Any further help would be greatly appreciated.

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