lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshum <ansh...@gmail.com>
Subject Re: Handling synonyms using Lucene
Date Sat, 08 Aug 2009 05:51:37 GMT
Hi Mitu,
Though your approach would work I'd suggest you build a custom analyzer
instead. Perhaps that'd be a bettter approach.

--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Sat, Aug 8, 2009 at 11:14 AM, mitu2009 <musicfreaque@gmail.com> wrote:

>
> Hi,
>
> What is the best way to handle synonyms (phrases) using Lucene? Especially,
> when I need to execute queries like :a OR b OR c NOT d
>
> How about adding a new field called "synonyms" to each document while
> indexing? This field's value would have a list of all synonyms. It would be
> added to a document only when that document has any of the synonyms.
>
> I would then execute an "OR" search query which would look for search
> keyword in this field alongwith other fields.
>
> Can this approach work well for any kind of query?
>
> Please suggest.
>
> Thanks.
>
> --
> View this message in context:
> http://www.nabble.com/Handling-synonyms-using-Lucene-tp24875308p24875308.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message