Spelling Matching Search


(Sumit Guptaa) #1

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


(David Pilato) #2

Hi Sumit,

I think you should use edge ngrams:
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:
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 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
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--

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

--


(amos.wood) #3

Sumit,

We have had success using the phonetic token filter too:
http://www.elasticsearch.org/guide/reference/index-modules/analysis/phonetic-tokenfilter.html

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
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--


(Sumit Guptaa) #4

Thanx amos.wood and dadoonet.
i got it.

Regards,
Sumit Gupta


(system) #5