lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan O'Hara <>
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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message