lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <>
Subject Re: Sorting direction
Date Sat, 26 May 2007 12:58:09 GMT
Would specifying "reverse" work, like

*(String <> field,
boolean reverse)

where the field is your timeOfIndexing field?

You are guaranteed that document ID order is invariant, even though
the IDs may change. That is, for any two documents if doc1 was
indexed before doc2, docID1 < docID2.

Although I don't see any way to specify a sort object that
reverses the INDEX_ORDER... hmmmm...


On 5/26/07, jafarim <> wrote:
> Hi folks,
> - I am wondering whether there is any mechanism to specify the sorting
> direction (i.e. ascending/descending) without being obliged to make a
> custom
> Sorter. I add a "timeOfIndexing" field in order that I can retrive results
> based ob recentness later. But the sorter sorts in an ascending manner and
> hence, old results are top results.
> - Can I count on Sorter.INDEX_ORDER instead of "timeOfIndexing" field for
> this purpose?
> regards,
> --jaf

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message