# Mapping nginx body\_bytes\_send with long and '-'

**URL:** <https://discuss.elastic.co/t/mapping-nginx-body-bytes-send-with-long-and/82696>\
**Category:** Elasticsearch\
**Created:** [April 18, 2017, 10:34am UTC](https://discuss.elastic.co/t/mapping-nginx-body-bytes-send-with-long-and/82696 "2017-04-18T10:34:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![141984](https://avatars.discourse-cdn.com/v4/letter/1/c37758/32.png) [@141984](https://discuss.elastic.co/u/141984)\
**Post date:** [April 18, 2017, 10:34am UTC](https://discuss.elastic.co/t/mapping-nginx-body-bytes-send-with-long-and/82696/1 "2017-04-18T10:34:41Z")

</div>

Hi,

How do i map nginx's body\_bytes\_send field that at times sends '-' and rest of the times a number?

I have tried creating a map type long for this field but it fails when line of logs has "-" in it.  
Can I map this field to two different types, if so how do i do it ?  
what is the recommended solution ?

---

<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:** [May 16, 2017, 10:43am UTC](https://discuss.elastic.co/t/mapping-nginx-body-bytes-send-with-long-and/82696/2 "2017-05-16T10:43:14Z")

</div>

Closed on May 16, 2017, 10:43am UTC

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