# Validation Failed: 1: type is missing error

**URL:** <https://discuss.elastic.co/t/validation-failed-1-type-is-missing-error/39708>\
**Category:** Elasticsearch\
**Created:** [January 20, 2016, 10:04pm UTC](https://discuss.elastic.co/t/validation-failed-1-type-is-missing-error/39708 "2016-01-20T22:04:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tesseract](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tesseract](https://discuss.elastic.co/u/tesseract)\
**Post date:** [January 20, 2016, 10:04pm UTC](https://discuss.elastic.co/t/validation-failed-1-type-is-missing-error/39708/1 "2016-01-20T22:04:08Z")

</div>

Hey guys,  
We are using Elasticsearch in production, and we start seeing this issue as soon as we start doing updates to our document.

Here is an extract of the mapping we use:  
{  
"_default_": {  
"\_ttl": {  
"enabled": true,  
"default": "1d"  
},  
"\_all": {  
"enabled": false  
},  
"properties": {  
"id": {  
"type": "string",  
"index": "not\_analyzed",  
"norms": {  
"enabled": false  
}  
},  
...  
"product": {  
"properties": {  
"product-id": {  
"type": "double"  
}  
...  
}  
}  
}  
}  
}

And this is the script that we use to update:  
`Script: "ctx._source.product[index]['product-has-clicked'] = true; ctx._source.product[index]['product-price'] = price"`

The updates are pushed to Elasticsearch but once we enable to updates to existing file, we get this error.  
_elastic: Error 400 (Bad Request): Validation Failed: 1: type is missing; [type=action\_request\_validation\_exception]_

There is no additional information that's returned aside from that. We are using golang library for elasticsearch integration ([https://github.com/olivere/elastic](https://github.com/olivere/elastic)). Is there anything you guys can think of that can help better debug this issue?

---

<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:** [July 5, 2017, 11:22pm UTC](https://discuss.elastic.co/t/validation-failed-1-type-is-missing-error/39708/2 "2017-07-05T23:22:53Z")

</div>


