# Finding "Singular" matches when searching a "Plural" term

**URL:** https://discuss.elastic.co/t/finding-singular-matches-when-searching-a-plural-term/16826
**Category:** Elasticsearch
**Created:** [April 4, 2014, 8:35pm UTC](https://discuss.elastic.co/t/finding-singular-matches-when-searching-a-plural-term/16826 "2014-04-04T20:35:21Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Raja\_Akhtar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raja_akhtar/32/772_2.png) [@Raja\_Akhtar](https://discuss.elastic.co/u/Raja_Akhtar)
#### Post date: [April 4, 2014, 8:35pm UTC](https://discuss.elastic.co/t/finding-singular-matches-when-searching-a-plural-term/16826/1 "2014-04-04T20:35:21Z")

</div>

I am fairly new to Elasticsearch and it's worked brilliantly so far.

I'm stuck in this issue of singular and plural terms, and have done quite a  
bit of research on it too.... and everyone's talking "stemmers",  
"snowball", "kstem" etc...

From what I understand... if I have stemmer analyzer on a term, I would  
have something like:

## term =\> stem

"knock" =\> "knock"  
"knocker" =\> "knock"  
"knocked" =\> "knock"  
"knocking" =\> "knock"

Therefore, if someone searched for "knock", they would see results with  
"knocked", "knocking" etc...  
Now I can achieve that with nGrams anyway.

What I'm trying to is the opposite.

I want someone to be able to type "knocking"... and still find "knocker",  
"knocked" etc...

In my particular use case, I want someone to be able to type "fridges" and  
still find "fridge"

How do I achieve this? Can I attached some sort of a stemmer on to the  
search\_analyser?  
Any help will be great.

--  
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/faa3a880-ed7f-4709-8e00-e8a63278af01%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/faa3a880-ed7f-4709-8e00-e8a63278af01%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)
#### Post date: [April 4, 2014, 8:54pm UTC](https://discuss.elastic.co/t/finding-singular-matches-when-searching-a-plural-term/16826/2 "2014-04-04T20:54:16Z")

</div>

You could add the snowball stemmer to your custom analyzer filters and that  
would likely work.

--  
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/4ab39cd2-25d6-4117-9911-9e08097281ca%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4ab39cd2-25d6-4117-9911-9e08097281ca%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Raja\_Akhtar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raja_akhtar/32/772_2.png) [@Raja\_Akhtar](https://discuss.elastic.co/u/Raja_Akhtar)
#### Post date: [April 6, 2014, 3:45pm UTC](https://discuss.elastic.co/t/finding-singular-matches-when-searching-a-plural-term/16826/3 "2014-04-06T15:45:04Z")

</div>

Hi Binh Ly,

I think you misunderstood. I have tried snowball and stemmer in my custom  
analysers... but in the example of "fridges", the stem for that is  
"fridge". Similarly, the stem for "fridge" is also fridge".  
What I want is when someone types "fridges", they should still get all  
results with "fridge" in it.

Thanks for the reply 🙂

On Friday, 4 April 2014 21:54:16 UTC+1, Binh Ly wrote:

> You could add the snowball stemmer to your custom analyzer filters and  
> that would likely work.

--  
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/227c5531-f1c3-414e-b5da-71c7e1e9afba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/227c5531-f1c3-414e-b5da-71c7e1e9afba%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [April 6, 2014, 10:16pm UTC](https://discuss.elastic.co/t/finding-singular-matches-when-searching-a-plural-term/16826/4 "2014-04-06T22:16:38Z")

</div>

The transformation you talk about is called baseform reduction. Most  
efficient approach is dictionary-based. Stemming is mostly restricted to  
algorithmic approaches which do not cover all cases.

You could try to use or setup a new dictionary in my  
elasticsearch-baseform-plugin

> **[GitHub - jprante/elasticsearch-analysis-baseform: Baseform lemmatization for...](https://github.com/jprante/elasticsearch-analysis-baseform)**
>
> Baseform lemmatization for Elasticsearch. Contribute to jprante/elasticsearch-analysis-baseform development by creating an account on GitHub.

Jörg

On Fri, Apr 4, 2014 at 10:35 PM, Raja Akhtar [raja.akhtar@gmail.com](mailto:raja.akhtar@gmail.com) wrote:

> I am fairly new to Elasticsearch and it's worked brilliantly so far.
> 
> I'm stuck in this issue of singular and plural terms, and have done quite  
> a bit of research on it too.... and everyone's talking "stemmers",  
> "snowball", "kstem" etc...
> 
> From what I understand... if I have stemmer analyzer on a term, I would  
> have something like:
> 
> ## term =\> stem
> 
> "knock" =\> "knock"  
> "knocker" =\> "knock"  
> "knocked" =\> "knock"  
> "knocking" =\> "knock"
> 
> Therefore, if someone searched for "knock", they would see results with  
> "knocked", "knocking" etc...  
> Now I can achieve that with nGrams anyway.
> 
> What I'm trying to is the opposite.
> 
> I want someone to be able to type "knocking"... and still find "knocker",  
> "knocked" etc...
> 
> In my particular use case, I want someone to be able to type "fridges" and  
> still find "fridge"
> 
> How do I achieve this? Can I attached some sort of a stemmer on to the  
> search\_analyser?  
> Any help will be great.
> 
> --  
> 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/faa3a880-ed7f-4709-8e00-e8a63278af01%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/faa3a880-ed7f-4709-8e00-e8a63278af01%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/faa3a880-ed7f-4709-8e00-e8a63278af01%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/faa3a880-ed7f-4709-8e00-e8a63278af01%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoGjT7iaypR8dqhU%3DB%2B0ApPqMDYNNkSKFwP%3D346Y3WmLcA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGjT7iaypR8dqhU%3DB%2B0ApPqMDYNNkSKFwP%3D346Y3WmLcA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![roytmana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roytmana/32/44855_2.png) [@roytmana](https://discuss.elastic.co/u/roytmana)
#### Post date: [April 7, 2014, 2:24am UTC](https://discuss.elastic.co/t/finding-singular-matches-when-searching-a-plural-term/16826/5 "2014-04-07T02:24:37Z")

</div>

Hi Jörg,

Is release of your plugin for ES 1.0.x and 1.1.x available?  
How is performance comparing to kstem?

Thanks  
Alex

--  
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/3ba11e28-e2ad-409a-91cc-aa101396aa66%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3ba11e28-e2ad-409a-91cc-aa101396aa66%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:37am UTC](https://discuss.elastic.co/t/finding-singular-matches-when-searching-a-plural-term/16826/6 "2017-07-06T01:37:54Z")

</div>


