# Name search in ElasticSearch

**URL:** <https://discuss.elastic.co/t/name-search-in-elasticsearch/82135>\
**Category:** Elasticsearch\
**Created:** [April 12, 2017, 9:57am UTC](https://discuss.elastic.co/t/name-search-in-elasticsearch/82135 "2017-04-12T09:57:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelcab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/angelcab/32/45618_2.png) [@angelcab](https://discuss.elastic.co/u/angelcab)\
**Post date:** [April 12, 2017, 9:57am UTC](https://discuss.elastic.co/t/name-search-in-elasticsearch/82135/1 "2017-04-12T09:57:41Z")

</div>

I have created an index with the names that I have in my database. I want that field on my index to be text so I can perform full-text search over it.

I am performing some querys and I'm having an issue that I don't know how to solve. I write down an example.

I have in my index this names:

"John Rham Rham" and "John Rham Rham Luke"

When I perform my query with the text : "John Rham Rham" I, obviously, obtain both results. But in this order:

John Rham Rham Luke  
John Rham Rham

How can I perform the query to obtain first the exact name that I am looking for?  
Thanks in advance.

---

<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:** [May 10, 2017, 10:03am UTC](https://discuss.elastic.co/t/name-search-in-elasticsearch/82135/2 "2017-05-10T10:03:57Z")

</div>

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