# Dynamic mapping numeric field datatypes greater than 2^63 - 1 (long type)

**URL:** <https://discuss.elastic.co/t/dynamic-mapping-numeric-field-datatypes-greater-than-2-63-1-long-type/158610>\
**Category:** Elasticsearch\
**Created:** [November 28, 2018, 3:32pm UTC](https://discuss.elastic.co/t/dynamic-mapping-numeric-field-datatypes-greater-than-2-63-1-long-type/158610 "2018-11-28T15:32:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anish\_Pradhan](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@Anish\_Pradhan](https://discuss.elastic.co/u/Anish_Pradhan)\
**Post date:** [November 28, 2018, 3:32pm UTC](https://discuss.elastic.co/t/dynamic-mapping-numeric-field-datatypes-greater-than-2-63-1-long-type/158610/1 "2018-11-28T15:32:02Z")

</div>

I assume that this is due to the numeric values not accommodated by "long" data type.

How can we handle these numeric values. Example:

```auto
doc = [ {
    "node": [{
        "table": [{
          "node-table": {
            "packets-up": 18440044073709951615,
            "packets-down": 18447644073709991615
          }
        }]
      }]
}]

from elasticsearch import Elasticsearch

es = Elasticsearch(hosts="localhost:9200")

res = es.indices.create(index="doc")

es.index(index="doc", doc_type='docs', body=doc)

```

Error:

```auto
Traceback (most recent call last):
  File "test.py", line 60, in <module>
    es.index(index="doc_test", doc_type='docs', body=doc)
  File "/Users/user/Projects/2018/es_test/.env/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 76, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/Users/user/Projects/2018/es_test/.env/lib/python2.7/site-packages/elasticsearch/client/ __init__.py", line 319, in index
    _make_path(index, doc_type, id), params=params, body=body)
  File "/Users/user/Projects/2018/es_test/.env/lib/python2.7/site-packages/elasticsearch/transport.py", line 318, in perform_request
    status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
  File "/Users/user/Projects/2018/es_test/.env/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 186, in perform_request
    self._raise_error(response.status, raw_data)
  File "/Users/user/Projects/2018/es_test/.env/lib/python2.7/site-packages/elasticsearch/connection/base.py", line 125, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: RequestError(400, u'mapper_parsing_exception', u'failed to parse')

```

---

<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 26, 2018, 3:32pm UTC](https://discuss.elastic.co/t/dynamic-mapping-numeric-field-datatypes-greater-than-2-63-1-long-type/158610/2 "2018-12-26T15:32:06Z")

</div>

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