# Matching an integer field

**URL:** <https://discuss.elastic.co/t/matching-an-integer-field/11025>\
**Category:** Elasticsearch\
**Created:** [March 5, 2013, 9:21pm UTC](https://discuss.elastic.co/t/matching-an-integer-field/11025 "2013-03-05T21:21:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Gonzalez](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@Daniel\_Gonzalez](https://discuss.elastic.co/u/Daniel_Gonzalez)\
**Post date:** [March 5, 2013, 9:21pm UTC](https://discuss.elastic.co/t/matching-an-integer-field/11025/1 "2013-03-05T21:21:01Z")

</div>

Hi,

Is it possible to filter by an integer field? I want to do an exact value  
match.

I have tried Elasticsearch Head to perform test queries. The integer field  
is indexed, but I can not perform a match to it: the option is not  
available, whereas it is available for the other fields.  
I really need to match this field (it is the organization id, which is used  
to split the data for our different clients). What are my options?

Thanks,  
Daniel

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [March 5, 2013, 11:58pm UTC](https://discuss.elastic.co/t/matching-an-integer-field/11025/2 "2013-03-05T23:58:55Z")

</div>

Yes. The option is available, but unfortunately a little bit hidden in  
the docs. For integers you can just use the "term" filter. Example:

> <https://gist.github.com/jprante/5095527>

Jörg

Am 05.03.13 22:21, schrieb Daniel Gonzalez:

> Hi,
> 
> Is it possible to filter by an integer field? I want to do an exact  
> value match.
> 
> I have tried Elasticsearch Head to perform test queries. The integer  
> field is indexed, but I can not perform a match to it: the option is  
> not available, whereas it is available for the other fields.  
> I really need to match this field (it is the organization id, which is  
> used to split the data for our different clients). What are my options?
> 
> ## Thanks, Daniel
> 
> You received this message because you are subscribed to the Google  
> Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send  
> an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:48am UTC](https://discuss.elastic.co/t/matching-an-integer-field/11025/3 "2017-07-06T02:48:11Z")

</div>


