# Current token (VALUE\_TRUE) not numeric, can not use numeric value accessors

**URL:** <https://discuss.elastic.co/t/current-token-value-true-not-numeric-can-not-use-numeric-value-accessors/156238>\
**Category:** Logstash\
**Created:** [November 12, 2018, 7:02am UTC](https://discuss.elastic.co/t/current-token-value-true-not-numeric-can-not-use-numeric-value-accessors/156238 "2018-11-12T07:02:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![muyuqj](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@muyuqj](https://discuss.elastic.co/u/muyuqj)\
**Post date:** [November 12, 2018, 7:02am UTC](https://discuss.elastic.co/t/current-token-value-true-not-numeric-can-not-use-numeric-value-accessors/156238/1 "2018-11-12T07:02:31Z")

</div>

In mysql, the status field type is tinyint, but when retrieved from jdbc, it becomes boolean, with only true and false  
This status field has several values, not only 0 and 1, but also 2.My configuration is：

{  
"template": "\*",  
"settings": {  
"index.refresh\_interval": "5s"  
},  
"mappings": {  
"doc": {  
"properties": {  
"name": {  
"type": "text",  
"analyzer": "ik\_max\_word",  
"search\_analyzer": "ik\_max\_word"  
},  
_ **"status": {** _  
_\*\*"type": "byte" \*\*_  
_\*\* }\*\*_  
}  
}  
}  
}  
logstash error:

Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>"175", :\_index=\>"goods", :\_type=\>"doc", :\_routing=\>nil}, #LogStash::Event:0x1cb52cc8], :response=\>{"index"=\>{"\_index"=\>"goods", "\_type"=\>"doc", "\_id"=\>"175", "status"=\>400, "error"=\>{"type"=\>"mapper\_parsing\_exception", "reason"=\>"failed to parse [status]", "caused\_by"=\>{"type"=\>"json\_parse\_exception", "reason"=\>"Current token (VALUE\_TRUE) not numeric, can not use numeric value accessors\n at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@5bf39ccc; line: 1, column: 119]"}}}}}

Does anyone know this?

---

<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 10, 2018, 7:02am UTC](https://discuss.elastic.co/t/current-token-value-true-not-numeric-can-not-use-numeric-value-accessors/156238/2 "2018-12-10T07:02:41Z")

</div>

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