podhmo/dictknife

shrink data helper

podhmo opened this issue · 1 comments

e.g.

"mappings" : {
  "message" : {
    "properties" : {
      "http_method" : {
        "type" : "string",
        "index" : "not_analyzed"
      },
      "http_response_code" : {
        "type" : "long"
      },
      "ingest_time" : {
        "type" : "date",
        "format": "strict_date_time"
      },
      "took_ms" : {
        "type" : "long"
      }
    }
  }
}

convert to below data, in 1 minutes

"mappings" : {
  "message" : {
    "properties" : {
      "http_method" : "",
      "http_response_code" : 0,
      "ingest_time" : "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
      "took_ms" : 0.0
    }
  }
}

refs

https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html