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 Reinforcer <an...@o-code.ru> on 2015/01/28 13:11:12 UTC

Morphology of synonims

Hi,

Is Solr capable of using morphology for synonims?

For example. Request: "inanely".
Indexed text in Solr: "Searching keywords without morphology is fatuously".
"inane" and "fatuous" are synonims.

So, "inanely" ---morphology----> "inane" -----synonims---> "fatuous"
---morphology----> "fatuously". Is this possible ("double morphology")?


Best regards



--
View this message in context: http://lucene.472066.n3.nabble.com/Morphology-of-synonims-tp4182517.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Morphology of synonims

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/28/2015 5:11 AM, Reinforcer wrote:
> Is Solr capable of using morphology for synonims?
> 
> For example. Request: "inanely".
> Indexed text in Solr: "Searching keywords without morphology is fatuously".
> "inane" and "fatuous" are synonims.
> 
> So, "inanely" ---morphology----> "inane" -----synonims---> "fatuous"
> ---morphology----> "fatuously". Is this possible ("double morphology")?

Synonyms are handled via exact match.  The feature you are describing is
called stemming or lemmatization.

https://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#Stemming

It is possible to combine stemming and synonyms in the same analysis
chain, but you must figure out what the root word is to put into your
synonym list.  It may not be what you expect.  For example, the english
stemmer will probably change "acheive" to "acheiv" ... which sounds
wrong, until you remember that stemming must be applied both at index
and query time, and the user will never see that form of the word.

Synonyms are usually only applied at either index or query time.  Which
one to choose depends on your requirements, but I believe it is
typically on the query side.

The analysis tab in the admin UI is invaluable for seeing the results of
changes in the analysis chain.

Thanks,
Shawn