AnsweredAssumed Answered

How to get the Lucene IndexReader and IndexSearcher objects

Question asked by stijndereede on Nov 27, 2007
Latest reply on Apr 29, 2010 by bwakkie

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
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.