mapper_parsing_exception | Elasticsearch |全球序数

时间:2016-05-12 13:18:16

标签: elasticsearch

我们试图在一个低基数的字符串列上强制执行全局序数以提升聚合。

以下是索引说明

{
  "recharge_olap": {
    "mappings": {
      "recharge_olap": {
        "_all": {
          "enabled": true
        },
        "dynamic_templates": [
          {
            "string_fields": {
              "mapping": {
                "index": "not_analyzed",
                "omit_norms": true,
                "type": "string"
              },
              "match": "*",
              "match_mapping_type": "string"
            }
          }
        ],
        "properties": {
          "@version": {
            "type": "string",
            "index": "not_analyzed"
          },
          "product_brand_name": {
            "type": "string",
            "index": "not_analyzed"
          },
          "vertical_name": {
            "type": "string",
            "index": "not_analyzed"
          }
        }
      }
    }
  }
}

当我们尝试为product_brand_name执行全局序号映射时,我收到以下错误?是否有任何可用的文档,因为我试图找到但无法提供太多帮助。

PUT /recharge_olap/_mapping/recharge_olap
{
  "product_brand_name": {
    "type": "string",
    "doc_values": true,
    "fielddata": {
      "loading" : "eager_global_ordinals" 
    }
  }
} 

以下是回复。

"error": {
          "root_cause": [
             {
                "type": "mapper_parsing_exception",
                "reason": "Root mapping definition has unsupported parameters:  [product_brand_name : {type=string, fielddata={loading=eager_global_ordinals}}]"
             }
          ],
          "type": "mapper_parsing_exception",
          "reason": "Root mapping definition has unsupported parameters:  [product_brand_name : {type=string, fielddata={loading=eager_global_ordinals}}]"
       },
       "status": 400
    }

1 个答案:

答案 0 :(得分:2)

我认为正确的命令是:

PUT /recharge_olap/_mapping/recharge_olap
{
  "properties": {
    "product_brand_name": {
      "type": "string",
      "index": "not_analyzed",
      "doc_values": true,
      "fielddata": {
        "loading": "eager_global_ordinals"
      }
    }
  }
}