# Elasticsearch + tire gem with exact match

**URL:** <https://discuss.elastic.co/t/elasticsearch-tire-gem-with-exact-match/13743>\
**Category:** Elasticsearch\
**Created:** [September 24, 2013, 10:20pm UTC](https://discuss.elastic.co/t/elasticsearch-tire-gem-with-exact-match/13743 "2013-09-24T22:20:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dom\_Hodgson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dom_hodgson/32/2083_2.png) [@Dom\_Hodgson](https://discuss.elastic.co/u/Dom_Hodgson)\
**Post date:** [September 24, 2013, 10:20pm UTC](https://discuss.elastic.co/t/elasticsearch-tire-gem-with-exact-match/13743/1 "2013-09-24T22:20:34Z")

</div>

Hey folks (I'm crossposting this from SO as hopefully this gets a bit more  
attention)

I'm currently using Tire to access my ES data however I've not been able to  
get it to do an exact match, for instance

User.search :per\_page =\> 10 do  
query do  
boolean do  
must { match :first\_name, 'tom'}  
must { match :last\_name, 'smith'}  
end  
endend

However that returns firstnames that are tom, tomas, tommy and tomiena..  
when I'd like it to only match tom.

I've tried a few things but can't work out where I'm going wrong

Thanks

--  
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:14am UTC](https://discuss.elastic.co/t/elasticsearch-tire-gem-with-exact-match/13743/2 "2017-07-06T02:14:49Z")

</div>

Closed on July 6, 2017, 2:14am UTC


