# Field is mapped as object but found a concrete value

**URL:** <https://discuss.elastic.co/t/field-is-mapped-as-object-but-found-a-concrete-value/312638>\
**Category:** Logstash\
**Created:** [August 22, 2022, 3:43pm UTC](https://discuss.elastic.co/t/field-is-mapped-as-object-but-found-a-concrete-value/312638 "2022-08-22T15:43:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thuunder7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thuunder7/32/97482_2.png) [@Thuunder7](https://discuss.elastic.co/u/Thuunder7)\
**Post date:** [August 22, 2022, 3:43pm UTC](https://discuss.elastic.co/t/field-is-mapped-as-object-but-found-a-concrete-value/312638/1 "2022-08-22T15:43:49Z")

</div>

Hello guys,

I know there is a boatload of threads about this topic, but unfortunately i cannot resolve my issue.  
I have an index that has this mapping:

```auto
"debug": {
	"properties" : {
		"input" : {
			"properties" : {
				"request" : {
					"properties" : {
                     ...

```

So, `debug.input.request` is an object. Sometimes this field comes has a string and i am not being able to create new field to store this value when it is not an object.  
Currently i have this on my pipeline but it is not working as i expected:

```auto
if [debug][input][request] {
        ruby { 
            code => 'event.set("debug_input_request", event.get("[debug][input][request]"))' 
            remove_field => ["[debug][input][request]" ]
        }
    }

```

The logstash error in question is the following:

```auto
"error"=>{"type"=>"mapper_parsing_exception", "reason"=>"object mapping for [debug.input.request] tried to parse field [request] as object, but found a concrete value"

```

---

<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 19, 2022, 3:44pm UTC](https://discuss.elastic.co/t/field-is-mapped-as-object-but-found-a-concrete-value/312638/2 "2022-09-19T15:44:19Z")

</div>

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