Just wanted to add this my original question: FYI, The synonyms in my application are totally custom and not from English dictionary...ie. "Global Leader in Finance" could also mean "Top Investment Bank" or "Fortune 500 Finance company" etc etc.
Anshum-2 wrote: > > 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 <[email protected]> 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: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > -- View this message in context: http://www.nabble.com/Handling-synonyms-using-Lucene-tp24875308p24888495.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
