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

**URL:** https://discuss.elastic.co/t/object-mapping-for-tags-tried-to-parse-field-tags-as-object-but-found-a-concrete-value/301375
**Category:** Kibana
**Tags:** ilm-index-lifecycle-management
**Created:** [April 2, 2022, 3:28am UTC](https://discuss.elastic.co/t/object-mapping-for-tags-tried-to-parse-field-tags-as-object-but-found-a-concrete-value/301375 "2022-04-02T03:28:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![D.J.2022](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/d.j.2022/32/103852_2.png) [@D.J.2022](https://discuss.elastic.co/u/D.J.2022)
#### Post date: [April 2, 2022, 3:28am UTC](https://discuss.elastic.co/t/object-mapping-for-tags-tried-to-parse-field-tags-as-object-but-found-a-concrete-value/301375/1 "2022-04-02T03:28:12Z")

</div>

Environment related

- Elasticsearch-7.14.2
- logstash-7.14.2
- kibana-7.14.2

```auto
DELETE tagsjons
PUT tagsjons
{
  "mappings": {
      "properties": {
          "title":{
            "type":"text"
          },
          "tags": {
            "type": "nested",
             "properties": {
                "group_name": {
                  "type": "keyword"
                },
                "tag_name": {
                  "type": "keyword"
                },
                "tag_id": {
                   "type": "keyword"
                },
                "type": {
                  "type": "long"
                }  
              }
          }
        }
      }
    }
  }
}

```

The Kibana console is plugged in without problems

```auto
PUT tagsjons/_doc/2
{
  "title":"json object",
  "tags": [
{"group_name":"group name","tag_name":"is ok","tag_id":"mUV-wdjnVd6tp6n7Q","type":1},{"group_name":"group name 2","tag_name":"not ok","tag_id":"qZ2Sba5c5R0bDw","type":1},{"group_name":"three","tag_name":"C","tag_id":"shUza_u11JgjBEnzA","type":1},{"group_name":"ss","tag_name":"okkkk）","tag_id":"eQo4KvOMRtQ","type":1}
]
 }

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/0/808753448aa1d855e64d0bd5437fd84519565694.png)

But there is a problem if it is imported through logstsh  
`object mapping for [tags] tried to parse field [tags] as object, but found a concrete value`

The main part of the error report

```auto
...
 "tags"=>"[{\"group_name\":\"22\",\"tag_name\":\"eee\",\"type\":1},{\"group_name\":\"dsfsf\",\"tag_name\":\"sfsfsd\",\"type\":2}]", "dialout_rule_id"=>0, 
 ...
 , :response=>{"index"=>{"_index"=>"test-index", "_type"=>"_doc", "_id"=>"1018", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"object mapping for [tags] tried to parse field [tags] as object, but found a concrete value"}}}}

```

It seems that this value is wrapped in double quotation marks, but at present, beginners can't find a good solution

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/8/f83213559674a9ed133685e8b3986b82782f329e.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/e/ee2878affaedbec821d5831ef4b4bed84c8b696c.png)

--  
logstash config like this

```auto
input {
  jdbc {
    jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
    jdbc_connection_string => "jdbc:mysql://192.168.0.2:3306/scrm_local?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull"
    jdbc_user => test 
    jdbc_password => test123
    use_column_value => true
    jdbc_default_timezone => "Asia/Shanghai"
    tracking_column => "id"
    tracking_column_type => "numeric"
    record_last_run => true
    last_run_metadata_path => "last.txt"
    statement => "SELECT * FROM example where id >:sql_last_value;"
    schedule => " * * * * *"
  }
}
output {
  elasticsearch {
    document_id => "%{id}"
    document_type => "_doc"
    index => "test-index"
    hosts => ["http://xxx:9200","http://xx:9200"]
  }
  stdout{
    codec => rubydebug
  }
} 

```

---

<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: [April 30, 2022, 3:29am UTC](https://discuss.elastic.co/t/object-mapping-for-tags-tried-to-parse-field-tags-as-object-but-found-a-concrete-value/301375/2 "2022-04-30T03:29:12Z")

</div>

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