# General question about field types

**URL:** <https://discuss.elastic.co/t/general-question-about-field-types/65900>\
**Category:** Elasticsearch\
**Created:** [November 13, 2016, 9:22am UTC](https://discuss.elastic.co/t/general-question-about-field-types/65900 "2016-11-13T09:22:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dee/32/18876_2.png) [@Dee](https://discuss.elastic.co/u/Dee)\
**Post date:** [November 13, 2016, 9:22am UTC](https://discuss.elastic.co/t/general-question-about-field-types/65900/1 "2016-11-13T09:22:18Z")

</div>

Hi,  
I have a general question about field types.  
I have a field with type double. But sometimes my log line doesn't have this field and it just stays as "-" (string).  
In that case Logstash refuses to index this log in ElasticSearch for obvious reasons.

What is the best practice in this case?

Thanks,

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 13, 2016, 10:00am UTC](https://discuss.elastic.co/t/general-question-about-field-types/65900/2 "2016-11-13T10:00:07Z")

</div>

You can try converting it to a zero value or just not sending anything (ie drop the field), but that may cause issues with aggregations and data not being 100% representative.

---

<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:** [December 11, 2016, 10:00am UTC](https://discuss.elastic.co/t/general-question-about-field-types/65900/3 "2016-12-11T10:00:39Z")

</div>

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