lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthik N S" <kart...@controlnet.co.in>
Subject RE: GETVALUES +SEARCH
Date Wed, 01 Dec 2004 12:37:08 GMT
Hi
  Erik

Apologies..........


  We create a ArrayList Object and Load all the Hit Values into them and
return
  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
Karthik


-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
Sent: Wednesday, December 01, 2004 4:04 PM
To: Lucene Users List
Subject: Re: GETVALUES +SEARCH


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: 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