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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]