# Object mapping for ... tried to parse field \[content\_range\] as object, but found a concrete value

**URL:** <https://discuss.elastic.co/t/object-mapping-for-tried-to-parse-field-content-range-as-object-but-found-a-concrete-value/340726>\
**Category:** Elasticsearch\
**Created:** [August 14, 2023, 9:08am UTC](https://discuss.elastic.co/t/object-mapping-for-tried-to-parse-field-content-range-as-object-but-found-a-concrete-value/340726 "2023-08-14T09:08:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bohm](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@bohm](https://discuss.elastic.co/u/bohm)\
**Post date:** [August 14, 2023, 9:08am UTC](https://discuss.elastic.co/t/object-mapping-for-tried-to-parse-field-content-range-as-object-but-found-a-concrete-value/340726/1 "2023-08-14T09:08:23Z")

</div>

Hello,

Found some informative posts already, but guess I misintepreted some info.

This is logstash logging:  
:response=\>{"index"=\>{"\_index"=\>"logstash-http-2023.08.14", "\_type"=\>"\_doc", "\_id"=\>"BobW8okBwOC2FKopPOGW", "status"=\>400, "error"=\>{"type"=\>"mapper\_parsing\_exception", "reason"=\>"object mapping for [http.content\_range] tried to parse field [content\_range] as object, but found a concrete value"}}}}

And indeed, most of the time http.content\_range is text but sometimes it is delivered as an object.  
So I created a filter which is not working so please help:

```auto
filter {
   if [event_type] =~ 'http' {
      if [http.content_range] {
         ruby { code => 'event.set("http.content_range", event.get("http.content_range").to_s)' }
      }
   }
}

```

Thanks!

---

<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:** [September 11, 2023, 9:08am UTC](https://discuss.elastic.co/t/object-mapping-for-tried-to-parse-field-content-range-as-object-but-found-a-concrete-value/340726/2 "2023-09-11T09:08:47Z")

</div>

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