# Python client scan/scroll intermittent shard failure for BIG\_INTEGER (throws IllegalStateException)

**URL:** <https://discuss.elastic.co/t/python-client-scan-scroll-intermittent-shard-failure-for-big-integer-throws-illegalstateexception/45161>\
**Category:** Elasticsearch\
**Created:** [March 22, 2016, 9:35pm UTC](https://discuss.elastic.co/t/python-client-scan-scroll-intermittent-shard-failure-for-big-integer-throws-illegalstateexception/45161 "2016-03-22T21:35:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![geebee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geebee/32/8297_2.png) [@geebee](https://discuss.elastic.co/u/geebee)\
**Post date:** [March 22, 2016, 9:35pm UTC](https://discuss.elastic.co/t/python-client-scan-scroll-intermittent-shard-failure-for-big-integer-throws-illegalstateexception/45161/1 "2016-03-22T21:35:05Z")

</div>

I am using the python library to do a scan/scroll of an index with ~12 million documents, do some work on them, and then bulk index them into a new index.

I run this script nightly on a cron job and sometimes (approximately 10% of the time), I get the following error: "ElasticsearchIllegalStateException[No matching token for number\_type [BIG\_INTEGER]]" during the scan.

There is no corresponding error in the server logs, and none of the documents being scanned have mapped fields that are the "long" (which corresponds to BIG\_INTEGER I believe) type.

I have investigated the documents that are failing during the scan by ID, and retrieving them by ID directly or by query on the \_id field yields no issues.

I have also played around with the scroll time and fetch size parameters to no avail.

I am completely out of ideas and would be very grateful if anyone had any insight, or could point me in the right direction. 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:** [July 5, 2017, 11:06pm UTC](https://discuss.elastic.co/t/python-client-scan-scroll-intermittent-shard-failure-for-big-integer-throws-illegalstateexception/45161/2 "2017-07-05T23:06:07Z")

</div>


