You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Dorel bruno <bd...@wanadoo.fr> on 2007/04/30 11:07:41 UTC

A little bit intricate !

A little bit intricate !

I propose a change for class TextContentIndexer :
To build a reader from thr revisionContent  :
Reader reader = ((ContentExtractor)extractor.get(i)).extract(new 
ByteArrayInputStream(revisionContent.getContentBytes()));
is used  this code seems to be a little bit intricate !


I propose :
Reader reader = 
((ContentExtractor)extractor.get(i)).extract(revisionContent.streamContent());
This code is simple and  will save a huge amount of memory  when the 
revision content is built using  a File (I use the FileInputStream)
Notice I use a file (and not bytes array ) to pass date from Slide to 
lucene as proposed  by Jimmy Monin several months ago and I can index
very large files whithout "OutOfMemory" Exception

Enjoy (as usually ...... )

B DOREL