On Dec 1, 2004, at 12:41 AM, Karthik N S wrote:
Is there any API in Lucene Which can retrieve all the searched Values in
single fetch


   into some sort of an 'Array'   WITHOUT using this [ below ] Looping
process [ This would make

   the Search and display more Faster ].

     for (int i = 0; i < hits.length();i++) {
              Document doc = hits.doc(i);
              String path  = doc.get("path");
            .....
     }

Are you really showing *all* results at one time? Or just the first several? Iterating over all hits and retrieving each Document is often unwise and generally unnecessary if only the first 20 or so are shown at first.


I don't know of a simpler way to get all the "path" values in your example. Perhaps a HitCollector is more to your liking? Though it probably would not speed anything up for you.

        Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to