lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kainth, Sachin" <Sachin.Kai...@atkinsglobal.com>
Subject RE: Returning only a small set of results
Date Thu, 22 Feb 2007 13:17:52 GMT
Thanks Erick you've helped a lot and so has everyone else. 

-----Original Message-----
From: Erick Erickson [mailto:erickerickson@gmail.com] 
Sent: 22 February 2007 13:00
To: java-user@lucene.apache.org
Subject: Re: Returning only a small set of results

See TopDocs, HitCollector, etc. You'll have to dig through the
documentation and try a few experiments to make sense of it all, one
sentence explanations aren't much help.

But think of Hits as a convenience class for getting the best-scoring
100 documents and use the other classes if you want to get *all* the
documents.
Don't go to the other classes unless you start getting performance
problems with Hits. The main take-away from Hits is that it'll
re-execute the query every 100 documents you read from it or so, so the
only time you care is when you find yourself assembling large numbers of
documents...

Erick

On 2/22/07, Kainth, Sachin <Sachin.Kainth@atkinsglobal.com> wrote:
>
> What can you use in place of Hits and how do they differ?
>
> -----Original Message-----
> From: Chris Hostetter [mailto:hossman_lucene@fucit.org]
> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message