# Link between Lucene NumericField and ES mapping type

**URL:** <https://discuss.elastic.co/t/link-between-lucene-numericfield-and-es-mapping-type/5510>\
**Category:** Elasticsearch\
**Created:** [October 4, 2011, 7:10am UTC](https://discuss.elastic.co/t/link-between-lucene-numericfield-and-es-mapping-type/5510 "2011-10-04T07:10:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trym](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@Trym](https://discuss.elastic.co/u/Trym)\
**Post date:** [October 4, 2011, 7:10am UTC](https://discuss.elastic.co/t/link-between-lucene-numericfield-and-es-mapping-type/5510/1 "2011-10-04T07:10:25Z")

</div>

Hi

Does ES use the Lucene org.apache.lucene.document.NumericField when I define  
a mapping of type long ("type" : "long")?  
And in which ES class(es) can I see this?

I am asking because I hope to get advantage of the trie structure when doing  
a range query on the numeric field.

Best regards Trym

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 4, 2011, 11:08am UTC](https://discuss.elastic.co/t/link-between-lucene-numericfield-and-es-mapping-type/5510/2 "2011-10-04T11:08:56Z")

</div>

Yes, the numeric types map to Lucene NumericField. Here is the mapper for  
the long type:  
[https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/core/LongFieldMapper.java](https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/core/LongFieldMapper.java)  
.

On Tue, Oct 4, 2011 at 9:10 AM, Trym [trym@sigmat.dk](mailto:trym@sigmat.dk) wrote:

> Hi
> 
> Does ES use the Lucene org.apache.lucene.document.NumericField when I  
> define a mapping of type long ("type" : "long")?  
> And in which ES class(es) can I see this?
> 
> I am asking because I hope to get advantage of the trie structure when  
> doing a range query on the numeric field.
> 
> Best regards Trym

---

<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 6, 2017, 3:52am UTC](https://discuss.elastic.co/t/link-between-lucene-numericfield-and-es-mapping-type/5510/3 "2017-07-06T03:52:53Z")

</div>


