2015-02-10 38 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

相關問題