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


(Raja Akhtar) #1

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/faa3a880-ed7f-4709-8e00-e8a63278af01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Binh Ly-2) #2

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4ab39cd2-25d6-4117-9911-9e08097281ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Raja Akhtar) #3

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 :slight_smile:

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/227c5531-f1c3-414e-b5da-71c7e1e9afba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Jörg Prante) #4

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

Jörg

On Fri, Apr 4, 2014 at 10:35 PM, Raja Akhtar 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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/faa3a880-ed7f-4709-8e00-e8a63278af01%40googlegroups.comhttps://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.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGjT7iaypR8dqhU%3DB%2B0ApPqMDYNNkSKFwP%3D346Y3WmLcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Alex Roytman) #5

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3ba11e28-e2ad-409a-91cc-aa101396aa66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #6