lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthik N S" <>
Date Wed, 01 Dec 2004 12:37:08 GMT


  We create a ArrayList Object and Load all the Hit Values into them and
  the same for Display purpose on a Servlet. On the servlet we track the
server side created ArrayList
  for Required number of dispalys.

 [ At any time we have to have all the hit values loaded into the arryList
,cannot compromise for the same ]

  We Obsorved that the doc.get("") was not continous for an hit of 4000 and
was coming
  in batches,

 So any new API features will definetly helps us.

With regards

-----Original Message-----
From: Erik Hatcher []
Sent: Wednesday, December 01, 2004 4:04 PM
To: Lucene Users List

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.


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

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

View raw message