title: Default value for missing field in document for elasticsearch statistical facet
body: <p>I am using a statistical facet (@see <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-statistical-facet.html" rel="nofollow">http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-statistical-facet.html</a>) to perform an aggregation on a few fields across the documents in my Elastic Search index.</p>
  
  <p>I was wondering if anyone knew if the API provided a means to provide a default value if a particular field does not exist.  For example, if a field does not exist use 0 (zero) as that fields value.  By default it seems to give a null pointer exception when the aggregation is taking place.</p>
  
  <p>My initial thoughts are to utilize a script field to test if the aggregation field is null and perform the default 0 logic there.</p>