# How null data time is treated in gauss function

**URL:** <https://discuss.elastic.co/t/how-null-data-time-is-treated-in-gauss-function/102044>\
**Category:** Elasticsearch\
**Created:** [September 28, 2017, 12:08am UTC](https://discuss.elastic.co/t/how-null-data-time-is-treated-in-gauss-function/102044 "2017-09-28T00:08:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [September 28, 2017, 12:08am UTC](https://discuss.elastic.co/t/how-null-data-time-is-treated-in-gauss-function/102044/1 "2017-09-28T00:08:03Z")

</div>

for example, I have following like function:

```
      "functions": [
          {"gauss":{"AvailableDate":{"scale":"120d","offset":"30d","decay":0.33}}}
      ],

```

if the AvailableDate is null in a document, how the ES handle it? just ignore the function or set it to max or min date time?

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [October 13, 2017, 11:20pm UTC](https://discuss.elastic.co/t/how-null-data-time-is-treated-in-gauss-function/102044/2 "2017-10-13T23:20:13Z")

</div>

Lucene mostly operates under the assumption that all fields have a value. When indexing, if a field is missing for a document, often some "zero value" is put in place of the missing value. In the case of this should be the value 0, since internally a date is stored as epoch millis in a `long`.

---

<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:** [November 10, 2017, 11:20pm UTC](https://discuss.elastic.co/t/how-null-data-time-is-treated-in-gauss-function/102044/3 "2017-11-10T23:20:29Z")

</div>

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