Hi,

The first thing that comes to mind is to not query with *:*, which I'm guessing 
you are doing, but by running a query with a time range constraint that you 
know will return you enough docs, but not so many that performance suffers.

And, of course, thinking beyond Solr, if you really know you always need last 
50, you could simply keep last 50 in memory somewhere and get it from there, 
not from Solr, which should be faster.

Otis 
----
Performance Monitoring for Solr / ElasticSearch / HBase - 
http://sematext.com/spm 



>________________________________
> From: Yuval Dotan <yuvaldo...@gmail.com>
>To: solr-user <solr-user@lucene.apache.org> 
>Sent: Tuesday, May 1, 2012 10:38 AM
>Subject: get latest 50 documents the fastest way
> 
>Hi Guys
>We have a use case where we need to get the 50 *latest *documents that
>match my query - without additional ranking,sorting,etc on the results.
>My index contains 1,000,000,000 documents and i noticed that if the number
>of found documents is very big (larger than 50% of the index size -
>500,000,000 docs) than it takes more than 5 seconds to get the results even
>with rows=50 parameter.
>Is there a way to get the results faster?
>Thanks
>Yuval
>
>
>

Reply via email to