What can you use in place of Hits and how do they differ? 

-----Original Message-----
From: Chris Hostetter [mailto:[EMAIL PROTECTED] 
Sent: 21 February 2007 22:43
To: java-user@lucene.apache.org
Subject: Re: Returning only a small set of results

: A question about efficiency and the internal workings of the Hits
class.
: When we make a call to IndexSearcher's search method thus:
:
: Hits hits = searcher.Search(query);
:
: Do we actually, physically get back all the results of the query even
if
: there are 20 million results or for efficiency do we physically get
back

the Hits class fetches back the first N result documents (where N is 100
i
think) and then it fetches more and more as needed if you ask for more.
generally speaking Hits works fine for simple pagination applications,
but if you are intented on walking deep down the list of ordred results,
i would avoid it.


-Hoss


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



This message has been scanned for viruses by MailControl - (see
http://bluepages.wsatkins.co.uk/?6875772)


This email and any attached files are confidential and copyright protected. If 
you are not the addressee, any dissemination of this communication is strictly 
prohibited. Unless otherwise expressly agreed in writing, nothing stated in 
this communication shall be legally binding.

The ultimate parent company of the Atkins Group is WS Atkins plc.  Registered 
in England No. 1885586.  Registered Office Woodcote Grove, Ashley Road, Epsom, 
Surrey KT18 5BW.

Consider the environment. Please don't print this e-mail unless you really need 
to. 

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

Reply via email to