Why this!!!(one field two types)

Hi all
I create a index by index template, the mapping as following:

{
    "template" : "logstash-bmwrtti-*",
    "settings" : {
        "index.refresh_interval" : "5s",
        "analysis" : {
            "tokenizer" : {
                "url_tokenizer" : {
                    "type" : "pattern",
                    "pattern" : "&"
                }
            },
            "analyzer" : {
                "url_analyzer" : {
                    "type" : "custom",
                    "tokenizer" : "url_tokenizer",
                    "filter" : ["lowercase"]
                }
            }
        }
    },
    "mappings" : {
        "_default_" : {
        	"_all": { 
                "enabled": false
            },
            "properties" : {
                "rowkey" : {
                    "type" : "text"
                },
                "dirveid" : {
                    "type" : "keyword"
                },
                "uri" : {
                    "type" : "text",
                    "analyzer" : "url_analyzer"
                },
                "reqtime" : {
                    "type" : "date",
                    "format" : "epoch_millis"
                },
                "restime" : {
                    "type" : "date",
                    "format" : "epoch_millis"
                },
                "answertime" : {
                    "type" : "integer"
                },
                "serverip" : {
                    "type" : "ip"
                },
                "adcode" : {
                    "type" : "keyword"
                },
                "ccplonlat" : {
                    "type" : "geo_point"
                },
                "deslonlat" : {
                    "type" : "geo_point"
                },
                "cversion" : {
                    "type" : "keyword"
                },
                "dversion" : {
                    "type" : "keyword"
                },
                "responsesize" : {
                    "type" : "integer"
                },
                "datatype" : {
                    "type" : "keyword"
                }
            }
        }
    }
}

And then , I get this mapping , response part as following:

"dirveid": {
       "type": "keyword"
  },
  "driveid": {
       "type": "text",
          "fields": {
            "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
   }

Why this ? Pls help~

You have two distinct fields, 'driveid' and 'dirveid' (incorrect spelling?).'dirveid' exists in your mapping, but 'driveid' does not, and therefore appears to have been assigned default mapping.

:cold_sweat:
how stupid !!! Thx

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.