Re: get latest 50 documents the fastest way

2012-05-04 Thread Nagendra Nagarajayya
You can do this with Solr 4.0 with RankingAlgorithm 1.4.2. Please pass the below parameters to your search: &age=latest&docs=50 For eg: http://localhost:8983/solr/select/?q=*:*&age=latest&docs=50 This would inspect the latest last 50 documents in real time and returns results accordingly. Us

Re: get latest 50 documents the fastest way

2012-05-01 Thread Li Li
you should reverse your sort algorithm. maybe you can override the tf method of Similarity and return -1.0f * tf(). (I don't know whether default collector allow score smaller than zero) Or you can hack this by add a large number or write your own collector, in its collect(int doc) method, you can

Re: get latest 50 documents the fastest way

2012-05-01 Thread Otis Gospodnetic
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 yo