2015-02-10 100 views
0

我的查询

curl -XPOST 10.1.1.108:9200/fw -d '{ 
    "settings" : { 
     "number_of_shards" : 2, 
     "number_of_replicas": 0, 
     "index.store.compress.stored":"true", 
     "index.store.compress.tv":"true", 
    "index.query.default_field":"rawlog", 
     "compress.default.type":"snappy", 
    "index.merge.policy.floor_segment":100, 
     "index.merge.policy.max_merge_at_once":100, 
     "es.batch.size.bytes" : "134217728", 
     "index.translog.flush_threshold_size": "536870912", 
     "network.tcp.keep_alive": "true", 
     "index.store.type":"mmapfs", 
    "client.transport.ping_timeout":"180s" 

    }, 
    "mappings" : { 
     "logs" : { 
      "_source" : { "enabled" : true,"compress":true,"compress_threshold":"100b","compress.default.type":"snappy"},  
      "_all":{"enabled" : false}, 
      "properties" : {     
     "cust_id": {"type" : "long","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "devi_id": {"type" : "long","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "evt_date": {"type" : "date","index" : "not_analyzed","format" : "yyyy-MM-dd" ,"fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "first_occurance": {"type" : "date","format" : "yyyy-MM-dd HH:mm:ss","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
       "hr":{ "type" : "string","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "type": {"type" : "string","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "action": {"type" : "string","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "status" : { "type" : "string","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
       "src" : { "type" : "long","index" : "not_analyzed","fielddata": {"format": "doc_values"},"doc_values_format" : "disk"},  
     "dst" : { "type" : "long","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "dst_port" : { "type" : "integer","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "rowid": {"type" : "long","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "url": {"type" : "string","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "sentinel_id": {"type" : "long","index" : "not_analyzed","fielddata": {"format": "doc_values"}, "doc_values_format" : "disk"}, 
     "src_name": {"type" : "string"}, 
     "dst_name": {"type" : "string"}, 
     "rawlog" : { "type" : "string"} 
     } 
     } 
    } 
}' 

错误

{“错误”:” MapperParsingException [映射[日志];嵌套: ElasticsearchIllegalArgumentException [未能找到doc_values_format [硬盘];”, “状态”:400}我使用elasticserach-1.4.1,当我试图创建一个索引,我收到以下错误

请苏ggest me.Thanks提前。

+0

而不是使用{“格式”:“doc_values”},“doc_values_format”:“硬盘”},是否有可用的任何其他选项在elasticserach-1.4.1中使用“doc”格式。请告诉我。 – 2015-02-11 06:26:36

回答

2

支持doc_values_format在elasticsearch 1.4是removed - 尝试删除该从你的映射

+0

但是我们只使用doc格式。是否有其他可用的方式available.Please建议。 – 2015-02-10 10:24:09

+0

@Ananta你不需要设置doc_values_format来使用doc_values - 设置字段数据格式应该已经足够了 – 2015-02-10 10:25:13

+0

它默认支持“doc_values_format”:“disk”。 – 2015-02-10 11:02:00

相关问题