# Error inserting data into Elastic 7.4.2: Can't get text on a START\_OBJECT at 6:20

**URL:** <https://discuss.elastic.co/t/error-inserting-data-into-elastic-7-4-2-cant-get-text-on-a-start-object-at-6-20/208233>\
**Category:** Elasticsearch\
**Created:** [November 17, 2019, 5:58pm UTC](https://discuss.elastic.co/t/error-inserting-data-into-elastic-7-4-2-cant-get-text-on-a-start-object-at-6-20/208233 "2019-11-17T17:58:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keith\_Driver](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_driver/32/53154_2.png) [@Keith\_Driver](https://discuss.elastic.co/u/Keith_Driver)\
**Post date:** [November 17, 2019, 5:58pm UTC](https://discuss.elastic.co/t/error-inserting-data-into-elastic-7-4-2-cant-get-text-on-a-start-object-at-6-20/208233/1 "2019-11-17T17:58:21Z")

</div>

I am using the following command to insert data into my index:

curl -H "Content-Type: application/json" -X POST "[http://localhost:9200/test-syntax/\_doc/10](http://localhost:9200/test-syntax/_doc/10)" --data-binary @1278.json

The contents of 1278.json is:

{  
"audit\_types": "any text",  
"date\_time": "Mon Nov 4 14:53:12 2019",  
"findings": {  
"CiscoIOS": {  
"finding 1": {  
"f1": "text here"  
}  
}  
}  
}

And get the error:

"error":{"root\_cause":[{"type":"mapper\_parsing\_exception","reason":"failed to parse field [findings.CiscoIOS.finding 1] of type [text] in document with id '10'. Preview of field's value: '{f1=text here}'"}],"type":"mapper\_parsing\_exception","reason":"failed to parse field [findings.CiscoIOS.finding 1] of type [text] in document with id '10'. Preview of field's value: '{f1=text here}'","caused\_by":{"type":"illegal\_state\_exception","reason":"Can't get text on a START\_OBJECT at 6:20"}},"status":400}

Now the strange part:

If I change the input JSON CiscoIOS to CiscoIOs -- it works!

{  
"audit\_types": "any text",  
"date\_time": "Mon Nov 4 14:53:12 2019",  
"findings": {  
"CiscoIOs": {  
"finding 1": {  
"f1": "text here"  
}  
}  
}  
}

{"\_index":"test-syntax","\_type":"\_doc","\_id":"10","\_version":14,"result":"updated","\_shards":{"total":1,"successful":1,"failed":0},"\_seq\_no":583,"\_primary\_term":1}

What is going on here?

I have a mapping in the index for the time format.

settings= {  
"settings": {  
"number\_of\_shards" : 1,  
"number\_of\_replicas" : 0,  
"index.mapping.depth.limit" : 50  
},  
"mappings": {  
"properties": {  
"date\_time" : { "type" : "date", "format" : "EEE MMM d[d] HH:mm:ss yyyy" }  
}  
}  
}

Any clues appreciated! Elastic version below

{  
"name" : "TWUKLAPTOP79",  
"cluster\_name" : "elasticsearch",  
"cluster\_uuid" : "-Ytbr3v8TQWVaa6y2PNRRw",  
"version" : {  
"number" : "7.4.2",  
"build\_flavor" : "unknown",  
"build\_type" : "unknown",  
"build\_hash" : "2f90bbf7b93631e52bafb59b3b049cb44ec25e96",  
"build\_date" : "2019-10-28T20:40:44.881551Z",  
"build\_snapshot" : false,  
"lucene\_version" : "8.2.0",  
"minimum\_wire\_compatibility\_version" : "6.8.0",  
"minimum\_index\_compatibility\_version" : "6.0.0-beta1"  
},  
"tagline" : "You Know, for Search"  
}

---

<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:** [December 15, 2019, 5:58pm UTC](https://discuss.elastic.co/t/error-inserting-data-into-elastic-7-4-2-cant-get-text-on-a-start-object-at-6-20/208233/2 "2019-12-15T17:58:27Z")

</div>

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