Thanks wunder for the response.

So I would like to know if I were to limit the resultset from Solr to 10
and my query actually matches, say 1000 documents, will the query
processing stop the moment the search finds the first 10 documents? Or
will the entire search be carried out and then sorted out based on their
ranks and the top 10 results be returned?

-Kumar

-----Original Message-----
From: Walter Underwood [mailto:wunderw...@netflix.com] 
Sent: Tuesday, February 17, 2009 10:06 PM
To: solr-user@lucene.apache.org
Subject: Re: Query regarding setTimeAllowed(Integer) and
setRows(Integer)

Requesting 5000 rows will use a lot of server time, because
it has to fetch the information for 5000 results when it
makes the response.

It is much more efficient to request only the results you
will need, usually 10 at a time.

wunder

On 2/17/09 3:30 AM, "Jana, Kumar Raja" <kj...@ptc.com> wrote:

> Hi,
> 
>  
> 
> I am trying to avoid queries which take a lot of server time. For this
I
> plan to use setRows(Integer) and setTimeAllowed(Integer) methods while
> creating the SolrQuery. I would like to know the following:
> 
>  
> 
> 1.       I set SolrQuery.setRows(5000) Will the processing of the
query
> stop once 5000 results are found or the query will be completely
> processed and then the result set is sorted out based on Rank Boosting
> and the top 5000 results are returned?
> 
> 2.       If I set SolrQuery.setTimeAllowed(2000) Will this kill query
> processing after 2 secs? (I know this question sounds silly but I just
> want a confirmation from the experts J )
> 
>  
> 
> Is there anything else I can do to get the desired results?
> 
>  
> 
> Thanks,
> 
> Kumar
> 

Reply via email to