Elasticsearch映射问题错误

问题描述:

这里的a link我的代码,我已编码,并有一个终端的屏幕截图,它显示它是什么样的错误。Elasticsearch映射问题错误

我有双重检查JSON文件的格式,但不断得到相同的错误。

请帮忙。 真诚,

+0

这是一个类似于https://*.com/questions/39288997/elasticsearch-root-mapping-definition-has-unsupported-parameters-index-not-a的问题吗? –

更新您的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