Thanks for your answer. I will use a timestamp  while waiting.
Do you think this feature will be added in a future release ?


2007/4/10, Yonik Seeley <[EMAIL PROTECTED]>:
On 4/10/07, jb <[EMAIL PROTECTED]> wrote:
> With Lucene, instead of returning results by date, I return results in the
> reverse index order (last doc added is returned first)
>
> For example :
>
> hits = searcher.search(luceneQuery,new Sort(new SortField(null,
> SortField.DOC, true))
>
> How can I do that with Solr ?

It's not currently supported, but it would be easy to implement.
We would just need to come up with a pseudo field-name to represent
the lucene document id, and then add support for that in the Sort
parsing code.

You could also add a timestamp field to every document (you could even
have it default to "NOW" so you wouldn't need to set it), and then
sort by that.  That does take more memory than sorting by index order
of course.

-Yonik

Reply via email to