2017-10-18 192 views
0

這裏的a link我的代碼,我已編碼,並有一個終端的屏幕截圖,它顯示它是什麼樣的錯誤。Elasticsearch映射問題錯誤

我有雙重檢查JSON文件的格式,但不斷得到相同的錯誤。

請幫忙。 真誠,

+0

這是一個類似於https://stackoverflow.com/questions/39288997/elasticsearch-root-mapping-definition-has-unsupported-parameters-index-not-a的問題嗎? –

回答

0

更新您的vuln_ip.json這樣:

{ 
    "mappings": { 
    "vulnerabilities": { 
     "properties": { 
     "address": { 
      "type": "ip" 
     }, 
     "cpes": { 
      "type": "text" 
     }, 
     "port": { 
      "type": "nested", 
      "properties": { 
      "portid": { 
       "type": "integer" 
      }, 
      "protocol": { 
       "type": "text" 
      }, 
      "service": { 
       "type": "nested", 
       "properties": { 
       "extrainfo": { 
        "type": "text" 
       }, 
       "name": { 
        "type": "text" 
       }, 
       "ostype": { 
        "type": "text" 
       }, 
       "product": { 
        "type": "text" 
       }, 
       "version": { 
        "type": "text" 
       } 
       } 
      }, 
      "state": { 
       "type": "text" 
      } 
      } 
     }, 
     "score": { 
      "type": "text" 
     } 
     } 
    } 
    } 
} 

修改您的curl命令這個curl -XPUT 'localhost:9200/vulnerable/' -d @vuln_ip.json