cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the Lucene IndexReader and IndexSearcher objects

stijndereede
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to create a "Similar Documents" search in Alfresco (for now, implemented as an action). I couldn't find this functionality in Alfresco, but I did find MoreLikeThis for Lucene (see http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/org/apache/lucene/search/simil...).
This seems to do what I want, but of course there's also a problem. This class needs the Lucene objects IndexReader and IndexSearcher. Is there any way to get these objects in Alfresco, perhaps with a bean?
I found that AbstractLuceneBase has two methods getReader() and getSearcher() which return the Lucene IndexReader and IndexSearcher, but I don't know how I get access this object in my Java code. The only bean getting close is the bean indexerAndSearcherFactory or admLuceneIndexerAndSearcherFactory, but these Java objects can't give me the Lucene objects.

Regards,

Stijn
1 REPLY 1

bwakkie
Champ in-the-making
Champ in-the-making
Hi Stijn,

Where you able to find your answer, I am interested in this too.

regards
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.