lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Is there any way to Collect all the searched documents at once?
Date Tue, 29 Jun 2004 14:00:51 GMT
Jayant,

That is not possible, as far as I know.
Have you tried using HitCollector (see
http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/HitCollector.html)?
I have not used it much, but it may be a tiny bit faster.  If you are
re-running the same query, you may also benefit from
http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/CachingWrapperFilter.html

Otis


--- Jayant Kumar <jayantlists@yahoo.co.in> wrote:
> Hi!!
> 
> Is there any way to fetch the fields of the searched
> documents at once rather than looping through the
> found documents one by one....because it consumes lots
> of time and time increases by magnitude if the no. of
> documents found are more.
> 
> This is how I am fetching the found documents ..
> 
> count=1500000 (no. of documents found) 
> 
> for(int i=0 ; i < count;i++ )
>                         {
>                                 Document doc =
> hits.doc(i);
>                                 fields[i] =
> Long.parseLong(doc.get("FIELD"));
>                         }
> 
> This takes around 2.5 minutes  for fetching 1500000
> records which is unacceptable.
> 
> Regards
> Karan
> 
> 
> 
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 


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


Mime
View raw message