lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From darniz <>
Subject Re: Synonym questions
Date Tue, 22 Dec 2009 23:50:06 GMT

i have a similar use case where i want to preserve original words forexamplei
have one way mapping at index time
monsoon,sony,levinson => audio system
when i index document for example with word sony i want ot index audio
system as well as the brand name ie sony.
so if some one types category:sony i want highlighted resutls.
if user types category:audio system i want the same document too.

i initially thought there might be some property like preserveOriginal for
synonym filter too like we had for worddelimiter tokeniser.

please let me know is there any alternative.


hossman wrote:
> : 1) For some of my synonyms, it seems to make senses to simply replace
> the
> : original word with the other (e.g. "theatre" => "theater", so searches
> for
> : either will find either). For others, I want to add an alternate term
> while
> : preserving the original (e.g. "cirque" => "circus", so searches for
> "circus"
> : find Cirque du Soleil, but searches for "cirque" only match "cirque",
> not
> : "circus".
> the simplest way i can think of to achieve something like this off the top
> of my head is to do synonym injecting when idexing and don't use the
> synonym filter at all when querying...
> theatre, theater => theatre, theater
> circus => circus, cirque
> (but i haven't tested this to be sure it does what i think it does, and i
> haven't thought about SynonymFilter very hard for a while now so i may be
> forgetting something subtle)
> -Hoss

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message