# Two field mapppings created one field.keyword and another field

**URL:** https://discuss.elastic.co/t/two-field-mapppings-created-one-field-keyword-and-another-field/212315
**Category:** Logstash
**Created:** [December 18, 2019, 12:08pm UTC](https://discuss.elastic.co/t/two-field-mapppings-created-one-field-keyword-and-another-field/212315 "2019-12-18T12:08:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SathishPrakasam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sathishprakasam/32/46290_2.png) [@SathishPrakasam](https://discuss.elastic.co/u/SathishPrakasam)
#### Post date: [December 18, 2019, 12:08pm UTC](https://discuss.elastic.co/t/two-field-mapppings-created-one-field-keyword-and-another-field/212315/1 "2019-12-18T12:08:31Z")

</div>

Hi team,

i need an urgent help, below is my elastic template.  
The fields that gets indexed is creating two fields, one with the field name "field" and another with name "field.keyword".  
Having tow different mapping for same field is preventing me from creating one click visulaization from Discover page of Kibana.

Can someone help me whats wrong with this template and why is it creating two fields?

{  
"index\_patterns": "_lsh-_\_fact-\*",  
"settings": {  
"index.refresh\_interval": "5s",  
"number\_of\_shards" : "1",  
"number\_of\_replicas" : "1"

```
},
"mappings": {
    "netactmapping":{
	"date_detection": false,
        	"dynamic_templates": [
	{
           		"message_field": {
              		"match": "message",
               		"match_mapping_type": "string",
               		"mapping": {
                    		"type": "keyword"
                		}
            	}
        	},
	{
                    "string_fields": {
                		"match": "*",
                		"match_mapping_type": "string",
                		"mapping": {
                    		"type": "keyword",
                    		"omit_norms": true
                		}
            	}
        	}],

        	"properties": {
            	"@version": {
            	"type": "keyword",
            	"doc_values" : true
            	},
        		"logtime": { "type": "keyword"},
     		"thread": { "type": "keyword"},
    		"data1": { "type": "keyword"},
    		"data2": { "type": "keyword"},
        		"loglevel": { "type": "keyword"},
    		"class": { "type": "keyword"},
        		"mess": { "type": "text"},
    		"hostname": { "type": "keyword"},
    		"type": { "type": "keyword"},
		"@timestamp": {"type": "date"},
	
       		"geoip": {
                		"type": "object",
                		"dynamic": true,
                		"properties": {
                    		"location": {
                        		"type": "geo_point"
                    		}
                		}
            	}
        	}
    }
}

```

}

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 15, 2020, 12:08pm UTC](https://discuss.elastic.co/t/two-field-mapppings-created-one-field-keyword-and-another-field/212315/2 "2020-01-15T12:08:33Z")

</div>

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