简体   繁体   中英

Elasticsearch mapping problems error

Here's a link to my gist code that I have coded and there is a screenshot of terminal which shows what kind of error it is.

I have double checked the format of JSON file but continuously getting the same error.

Please help. Sincerely,

Update your vuln_ip.json to this:

{
  "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"
        }
      }
    }
  }
}

Modify your curl command to this curl -XPUT 'localhost:9200/vulnerable/' -d @vuln_ip.json .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM