Recreation of mapping elastic search

Viewed 12923

logstash configI have created my index on elasticsearch and through kibana as well and have uploaded data. Now i want to change the mapping for the index and change some fields to not analyzed .Below is my mapping which i want to replace from existing one . But when i run below command it gives me error

{"error":{"root_cause":[{"type":"index_already_exists_exception","reason":"already exists","index":"rettrmt"}],"type":"index_already_exists_exception","reason":"already exists","index":"rettrmt"},"status":400}

Kindly help to get it close.

curl -XPUT 'http://10.56.139.61:9200/rettrmt' -d '{
  "rettrmt": {
    "aliases": {},
    "mappings": {
      "RETTRMT": {
        "properties": {
          "@timestamp": {
            "type": "date",
            "format": "strict_date_optional_time||epoch_millis"
          },
          "@version": {
            "type": "string"
          },
          "acid": {
            "type": "string"
          },
          "actor_id": {
            "type": "string",
            "index": "not_analyzed"
          },
          "actor_type": {
            "type": "string",
            "index": "not_analyzed"
          },
          "channel_id": {
            "type": "string",
            "index": "not_analyzed"
          },
          "circle": {
            "type": "string",
            "index": "not_analyzed"
          },
          "cr_dr_indicator": {
            "type": "string",
            "index": "not_analyzed"
          },
          "host": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "orig_input_amt": {
            "type": "double"
          },
          "path": {
            "type": "string"
          },
          "r_cre_id": {
            "type": "string"
          },
          "sub_use_case": {
            "type": "string",
            "index": "not_analyzed"
          },
          "tran_amt": {
            "type": "double"
          },
          "tran_id": {
            "type": "string"
          },
          "tran_particulars": {
            "type": "string"
          },
          "tran_particulars_2": {
            "type": "string"
          },
          "tran_remarks": {
            "type": "string"
          },
          "tran_sub_type": {
            "type": "string"
          },
          "tran_timestamp": {
            "type": "date",
            "format": "strict_date_optional_time||epoch_millis"
          },
          "tran_type": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "use_case": {
            "type": "string",
            "index": "not_analyzed"
          }
        }
      }
    },
    "settings": {
      "index": {
        "creation_date": "1457331693603",
        "uuid": "2bR0yOQtSqqVUb8lVE2dUA",
        "number_of_replicas": "1",
        "number_of_shards": "5",
        "version": {
          "created": "2000099"
        }
      }
    },
    "warmers": {}
  }
}'
2 Answers
Related