# Searching Human Names In Elastic Search

**URL:** <https://discuss.elastic.co/t/searching-human-names-in-elastic-search/14889>\
**Category:** Elasticsearch\
**Created:** [December 16, 2013, 3:07pm UTC](https://discuss.elastic.co/t/searching-human-names-in-elastic-search/14889 "2013-12-16T15:07:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathan\_Smith](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@Nathan\_Smith](https://discuss.elastic.co/u/Nathan_Smith)\
**Post date:** [December 16, 2013, 3:07pm UTC](https://discuss.elastic.co/t/searching-human-names-in-elastic-search/14889/1 "2013-12-16T15:07:15Z")

</div>

Hi,

I'm currently build a replacement search service, it searches Scottish  
human names and its essential that the data being returned is as close to  
the current solution as possible....

Imagine this -

I put in a search for "Michael Heaney", I can either use a bool across both  
a fore/surname field or I have a concatenated field of bothe fore/surname...

The current search solution returns all matching "Michael Heaney" but also  
a few "Michael Heavey"', how would I approach this best, not only for this  
case but to try and get similar names being returned in my results?

I have tried a bool fuzzy query over the two fields however im finding it  
difficult to get appropriate results.

Thanks, Nathan.

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a3ca18d9-5ba2-45f0-acd1-23306e30e1d6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a3ca18d9-5ba2-45f0-acd1-23306e30e1d6%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [December 16, 2013, 3:56pm UTC](https://discuss.elastic.co/t/searching-human-names-in-elastic-search/14889/2 "2013-12-16T15:56:17Z")

</div>

Try phonetic search, soundex and the like. I do hope it works for scottish  
as well 🙂  
On Dec 16, 2013 5:07 PM, "Nathan Smith" [nathn.smith@gmail.com](mailto:nathn.smith@gmail.com) wrote:

> Hi,
> 
> I'm currently build a replacement search service, it searches Scottish  
> human names and its essential that the data being returned is as close to  
> the current solution as possible....
> 
> Imagine this -
> 
> I put in a search for "Michael Heaney", I can either use a bool across  
> both a fore/surname field or I have a concatenated field of bothe  
> fore/surname...
> 
> The current search solution returns all matching "Michael Heaney" but also  
> a few "Michael Heavey"', how would I approach this best, not only for this  
> case but to try and get similar names being returned in my results?
> 
> I have tried a bool fuzzy query over the two fields however im finding it  
> difficult to get appropriate results.
> 
> Thanks, Nathan.
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/a3ca18d9-5ba2-45f0-acd1-23306e30e1d6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a3ca18d9-5ba2-45f0-acd1-23306e30e1d6%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZuQj%3DCSJBe%3D9xfZ0s9Q1kH83gyDx1Ehwz07Ybe%3DLKR6HA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZuQj%3DCSJBe%3D9xfZ0s9Q1kH83gyDx1Ehwz07Ybe%3DLKR6HA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Nathan\_Smith](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@Nathan\_Smith](https://discuss.elastic.co/u/Nathan_Smith)\
**Post date:** [December 16, 2013, 4:09pm UTC](https://discuss.elastic.co/t/searching-human-names-in-elastic-search/14889/3 "2013-12-16T16:09:37Z")

</div>

Thanks for your reply. I just realised i didnt mention, however I am using  
the phonetic plugin for elasticsearch and I am currently using Metaphone..

"The metaphone code for _Heavey_ is HF.

The metaphone code for _Heaney_ is HN.

These surnames do not have the same metaphone code."

The codes are different and this is the same for soundex. I think the query  
is what needs adjusting.

Anyone else any suggestions?

On Monday, 16 December 2013 15:56:17 UTC, Itamar Syn-Hershko wrote:

> Try phonetic search, soundex and the like. I do hope it works for scottish  
> as well 🙂  
> On Dec 16, 2013 5:07 PM, "Nathan Smith" \<[nathn...@gmail.com](mailto:nathn...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Hi,
> > 
> > I'm currently build a replacement search service, it searches Scottish  
> > human names and its essential that the data being returned is as close to  
> > the current solution as possible....
> > 
> > Imagine this -
> > 
> > I put in a search for "Michael Heaney", I can either use a bool across  
> > both a fore/surname field or I have a concatenated field of bothe  
> > fore/surname...
> > 
> > The current search solution returns all matching "Michael Heaney" but  
> > also a few "Michael Heavey"', how would I approach this best, not only for  
> > this case but to try and get similar names being returned in my results?
> > 
> > I have tried a bool fuzzy query over the two fields however im finding it  
> > difficult to get appropriate results.
> > 
> > Thanks, Nathan.
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/a3ca18d9-5ba2-45f0-acd1-23306e30e1d6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a3ca18d9-5ba2-45f0-acd1-23306e30e1d6%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/83f09815-8e0b-47a2-962a-cd00f949e4fd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/83f09815-8e0b-47a2-962a-cd00f949e4fd%40googlegroups.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:00am UTC](https://discuss.elastic.co/t/searching-human-names-in-elastic-search/14889/4 "2017-07-06T02:00:55Z")

</div>


