lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan O'Hara <oh...@genome.chop.edu>
Subject Re: Fastest Method for Searching (need all results)
Date Wed, 02 Aug 2006 20:35:17 GMT
eks dev,

The most best way of looping through all results that I have come  
across is using a HitCollector and grabbing the field values via  
FieldCache.  This is under two conditions:  1) The FieldCache arrays  
are initialized only once, since creating these arrays creates  
serious overhead, especially if you have millions of documents in  
your index.  I use Tomcat as my application server, so the way I  
accomplished this was I created a Listener class that extends  
ServletContextListener.  This way, when Tomcat restarts, the  
contextInitialize method in the Listener class is executed,  
initializing the arrays only once.  These arrays are then accessible  
to all users across all sessions.  2)You have enough RAM to store the  
arrays.  If you are dealing with millions of documents, you can  
easily use up hundreds of megabytes of RAM, so keep this in mind.   
Just thought I would let you know how I made out.  Thanks again.

Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message