You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jaimin Patel <jp...@tuvalabs.com> on 2018/02/14 10:52:22 UTC

Not getting appropriate spell suggestions

Here is link to solrconfig.xml
<https://gist.github.com/jpatel3/26c63ca503754937cea763b13f18aca4> and
managed-schema
<https://gist.github.com/jpatel3/70848eeb46fdd529a8ad944d2537d862>.

I have document with following value in suggestions (field used for spell
check), same information as information available in text field.

"suggestion":"Amylase Production, Part 1\nIn humans, salivary α-amylase is
produced by the AMY1 gene on chromosome 1. \n\n;;br\nHumans are diploid
organisms, meaning that they generally have two copies of genes that are
not present on the X and Y chromosomes -- one copy inherited from each
parent. \n\n;;br\nHowever, genetic studies show that people can have
anywhere from two to 15 copies of the AMY1 gene on each chromosome 1,
suggesting that the gene has been duplicated during human
evolution.\n\n;;br\nWhy would humans evolve multiple copies of a gene?"

*Search term and result*
"amylase" - works and provides appropriate result
"amylas" - No result, it identify as correct spelling
"amylos" - No result, spell suggestion is "amylas" (without e)


Similar situation with another term -
"declaratoin" - Correct spell for it is "declaration", I have document with
suggestions field value "declaration of independence", but the spell
suggestion returns "declar", I would imagine that it would return the close
match one instead of something like "declar" (which is also without e, so I
am suspecting it has something to do with PorterStemFilterFactory, but even
after I commented it, it shows same result.

Can someone help what I am not understanding correctly?How can I improve
when there is one character difference (missing or swap postion)

Thanks.


-- 
Jaimin

ᐧ

Re: Not getting appropriate spell suggestions

Posted by Alessandro Benedetti <a....@sease.io>.
 Given your schema the stemmer seems a very likely responsible.
You need to disable it and re-index.
Just commenting it is not going to work if you don't re-index.

Cheers



-----
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html