# Validation Failed: 1: mapping type is missing

**URL:** <https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/166629>\
**Category:** Elasticsearch\
**Created:** [January 31, 2019, 7:03pm UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/166629 "2019-01-31T19:03:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![liran](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@liran](https://discuss.elastic.co/u/liran)\
**Post date:** [January 31, 2019, 7:03pm UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/166629/1 "2019-01-31T19:03:49Z")

</div>

Hi,  
I'm a newbie to the ELK stack and I'm probably stuck due a syntax error.  
Any help would be most appreciated.

I've installed ES and I'm trying to create a mapping for my index to fit the following json:  
{  
"facets": [  
{  
"name": "https://web\_address\_example.aspx",  
"results": [  
{  
"count": 13995  
},  
{  
"average": 2.188390496605931  
},  
{  
"max": 157.3  
},  
{  
"min": 0.391  
}  
]  
}  
}

The mapping syntax I've tried so far but fails is:

post /db\_average\_response\_time/\_mappings/  
{  
"mapping":  
{  
"facets" :  
{  
"fields" :  
{  
"name" :  
{  
"type" : "text"  
},  
"results" :  
{  
"fields" :  
{  
"count" :  
{  
"type" : "integer"  
},  
"average" :  
{  
"type" : "double"  
},  
"max" :  
{  
"type" : "double"  
},  
"min" :  
{  
"type" : "double"  
}  
}  
}  
}  
}  
}  
}

---

<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:** [February 28, 2019, 7:03pm UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/166629/2 "2019-02-28T19:03:50Z")

</div>

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