# List of integers vs list of long

**URL:** <https://discuss.elastic.co/t/list-of-integers-vs-list-of-long/68664>\
**Category:** Elasticsearch\
**Created:** [December 12, 2016, 6:22am UTC](https://discuss.elastic.co/t/list-of-integers-vs-list-of-long/68664 "2016-12-12T06:22:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sree2k](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Sree2k](https://discuss.elastic.co/u/Sree2k)\
**Post date:** [December 12, 2016, 6:22am UTC](https://discuss.elastic.co/t/list-of-integers-vs-list-of-long/68664/1 "2016-12-12T06:22:52Z")

</div>

Hello Folks,

I'm exploring elasticsearch for my project. I had a question about the type. I'm using transport client. I have documents of the following format, where ids and otherids fields are list of long numbers (this is just an example)

{  
ids : [100, 200, ..],  
otherids: [300, 400..]  
}

when I query back, I get a list of integers where I was expecting it to list of longs. any idea, why I'm seeing this behavior ?

(If I query the mapping from curl or postman, I see, its type = long. )

Any suggestions would be helpful.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 12, 2016, 7:55am UTC](https://discuss.elastic.co/t/list-of-integers-vs-list-of-long/68664/2 "2016-12-12T07:55:00Z")

</div>

What does your code look like?

---

<div class="post-metadata">

**Author:** ![SKumarMN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skumarmn/32/27537_2.png) [@SKumarMN](https://discuss.elastic.co/u/SKumarMN)\
**Post date:** [December 12, 2016, 7:55am UTC](https://discuss.elastic.co/t/list-of-integers-vs-list-of-long/68664/3 "2016-12-12T07:55:01Z")

</div>

Hi,

Have you defined the mapping as long ?. Can you post the index mapping

---

<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:** [January 10, 2017, 12:27am UTC](https://discuss.elastic.co/t/list-of-integers-vs-list-of-long/68664/5 "2017-01-10T00:27:33Z")

</div>

Closed on January 10, 2017, 12:27am UTC

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