# Spelling Matching Search

**URL:** <https://discuss.elastic.co/t/spelling-matching-search/8942>\
**Category:** Elasticsearch\
**Created:** [September 6, 2012, 7:10am UTC](https://discuss.elastic.co/t/spelling-matching-search/8942 "2012-09-06T07:10:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sumit\_Guptaa](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Sumit\_Guptaa](https://discuss.elastic.co/u/Sumit_Guptaa)\
**Post date:** [September 6, 2012, 7:10am UTC](https://discuss.elastic.co/t/spelling-matching-search/8942/1 "2012-09-06T07:10:12Z")

</div>

Hi all,

Can Anybody tell me how me can search like that suppose we have two document like:-

1: {"doc":"sumit"}  
2: {"doc":"sumeet"}

And when we search for {"term":"sumit"} we get both the document....is it possible in ES?

Thanx

Regards,  
Sumit Gupta

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 6, 2012, 7:16am UTC](https://discuss.elastic.co/t/spelling-matching-search/8942/2 "2012-09-06T07:16:41Z")

</div>

Hi Sumit,

I think you should use edge ngrams:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

[http://www.elasticsearch.org/guide/reference/index-modules/analysis/edgengram-tokenfilter.html](http://www.elasticsearch.org/guide/reference/index-modules/analysis/edgengram-tokenfilter.html)  
And/Or synonyms:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

[http://www.elasticsearch.org/guide/reference/index-modules/analysis/synonym-tokenfilter.html](http://www.elasticsearch.org/guide/reference/index-modules/analysis/synonym-tokenfilter.html)

So search for sumit (sum) will hit docs containing sumeet (sum) but with a  
lesser score than docs with sumit.

My 2 cents

HTH  
David.

Le 6 septembre 2012 à 09:10, Sumit Guptaa [sumit.gupta.ngi@gmail.com](mailto:sumit.gupta.ngi@gmail.com) a écrit :

> Hi all,
> 
> Can Anybody tell me how me can search like that suppose we have two document  
> like:-
> 
> 1: {"doc":"sumit"}  
> 2: {"doc":"sumeet"}
> 
> And when we search for {"term":"sumit"} we get both the document....is it  
> possible in ES?
> 
> Thanx
> 
> Regards,  
> Sumit Gupta
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Spelling-Matching-Search-tp4022456.html](http://elasticsearch-users.115913.n3.nabble.com/Spelling-Matching-Search-tp4022456.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<div class="post-metadata">

**Author:** ![amos\_wood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amos_wood/32/1880_2.png) [@amos\_wood](https://discuss.elastic.co/u/amos_wood)\
**Post date:** [September 6, 2012, 12:17pm UTC](https://discuss.elastic.co/t/spelling-matching-search/8942/3 "2012-09-06T12:17:18Z")

</div>

Sumit,

We have had success using the phonetic token filter too:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

This will mean that a search for "sumit" could match a record which was  
"sumit" or the phonetically equivalent word "sumeet".

On Thursday, September 6, 2012 2:10:15 AM UTC-5, Sumit Gupta wrote:

> Hi all,
> 
> Can Anybody tell me how me can search like that suppose we have two  
> document  
> like:-
> 
> 1: {"doc":"sumit"}  
> 2: {"doc":"sumeet"}
> 
> And when we search for {"term":"sumit"} we get both the document....is it  
> possible in ES?
> 
> Thanx
> 
> Regards,  
> Sumit Gupta
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Spelling-Matching-Search-tp4022456.html](http://elasticsearch-users.115913.n3.nabble.com/Spelling-Matching-Search-tp4022456.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--

---

<div class="post-metadata">

**Author:** ![Sumit\_Guptaa](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Sumit\_Guptaa](https://discuss.elastic.co/u/Sumit_Guptaa)\
**Post date:** [September 7, 2012, 3:01pm UTC](https://discuss.elastic.co/t/spelling-matching-search/8942/4 "2012-09-07T15:01:01Z")

</div>

Thanx amos.wood and dadoonet.  
i got it.

Regards,  
Sumit Gupta

---

<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:13am UTC](https://discuss.elastic.co/t/spelling-matching-search/8942/5 "2017-07-06T03:13:45Z")

</div>


