aspose file tools*
The moose likes Other Application Frameworks and the fly likes relative search in lucene Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "relative search in lucene" Watch "relative search in lucene" New topic
Author

relative search in lucene

MaheshEnsarm More
Greenhorn

Joined: Mar 20, 2012
Posts: 1
Hi,


I am having only "Europe" being indexed along with some related data,but when someone searches using the word "Germany" although there is nothing specifically indexed for Germany but logically I can provide results under Europe than providing nothing at all,is there any way to do this? Does lunene have any supporting libraries which can do this?


Thanks in advance,
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
I see two possibilities: either build something like the SynonymAnalyzer described in chapter 4.5 of Lucene in Action 2nd ed., or check out the org.apache.lucene.analysis.synonym.WordnetSynonymParser class that comes with Lucene. (If you were going to object that you don't have the book, go buy it now - anybody doing serious work with Lucene needs it. Seriously.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: relative search in lucene