# Is it possible to index a default value when a document property is undeclared?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-index-a-default-value-when-a-document-property-is-undeclared/9849>\
**Category:** Elasticsearch\
**Created:** [November 27, 2012, 6:23pm UTC](https://discuss.elastic.co/t/is-it-possible-to-index-a-default-value-when-a-document-property-is-undeclared/9849 "2012-11-27T18:23:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbrianjones](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbrianjones/32/1402_2.png) [@tbrianjones](https://discuss.elastic.co/u/tbrianjones)\
**Post date:** [November 27, 2012, 6:23pm UTC](https://discuss.elastic.co/t/is-it-possible-to-index-a-default-value-when-a-document-property-is-undeclared/9849/1 "2012-11-27T18:23:22Z")

</div>

I'd like ElasticSearch to index a default value for a property when that  
property is not defined when the document is created. At first I thought  
null\_value did this, but now I realize this only helps when the property is  
defined as NULL.

Is it possible to index a default value when a document property is  
undeclared?

--

---

<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 6, 2017, 3:02am UTC](https://discuss.elastic.co/t/is-it-possible-to-index-a-default-value-when-a-document-property-is-undeclared/9849/2 "2017-07-06T03:02:39Z")

</div>


