# Fix field values while importing

**URL:** <https://discuss.elastic.co/t/fix-field-values-while-importing/24047>\
**Category:** Logstash\
**Created:** [June 21, 2015, 4:07pm UTC](https://discuss.elastic.co/t/fix-field-values-while-importing/24047 "2015-06-21T16:07:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![refaelos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/refaelos/32/516_2.png) [@refaelos](https://discuss.elastic.co/u/refaelos)\
**Post date:** [June 21, 2015, 4:07pm UTC](https://discuss.elastic.co/t/fix-field-values-while-importing/24047/1 "2015-06-21T16:07:27Z")

</div>

Hey,

When I fetch events from S3 into ES i'm getting multiple errors like this:

```auto
Caused by: org.elasticsearch.common.jackson.core.JsonParseException: Numeric value (9223372036854776000) out of range of long (-9223372036854775808 - 9223372036854775807)

```

This error is show on ES. The error on LS is something like:

```auto
"... failed action with response of 400, dropping action ... "

```

I understand that some of my events have a numeric value that exceeds the maximum allowed by ES. Is it possible that whenever LS sees then number '9223372036854776000' it'll convert it to '9223372036854775807' ?

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [June 21, 2015, 4:47pm UTC](https://discuss.elastic.co/t/fix-field-values-while-importing/24047/2 "2015-06-21T16:47:49Z")

</div>

My only thought is using the ruby filter

Of course if you keep the value as a String you will not have this issue 😄 but you probably want to use it for charting

```auto
filter{
if [bigint]{
ruby {
    code => "event['duration_down'] = event['hour']*3600 + event['min']*60 + event['sec']"
}
}
}

```

---

<div class="post-metadata">

**Author:** ![refaelos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/refaelos/32/516_2.png) [@refaelos](https://discuss.elastic.co/u/refaelos)\
**Post date:** [June 22, 2015, 5:29am UTC](https://discuss.elastic.co/t/fix-field-values-while-importing/24047/3 "2015-06-22T05:29:30Z")

</div>

Good idea. I'll try that.

---

<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, 5:36am UTC](https://discuss.elastic.co/t/fix-field-values-while-importing/24047/4 "2017-07-06T05:36:55Z")

</div>


