On Tue, Nov 20, 2012 at 1:49 AM, Ravikumar Govindarajan <ravikumar.govindara...@gmail.com> wrote: > Thanks Mike. Actually, I think I can eliminate sort-by-time, if I am able > to iterate postings in reverse doc-id order. Is this possible in lucene?
Alas that is not easy to do in Lucene: the posting lists are encoded in forward docID order. But, I think it should be possible with some fun codec & merge policy & MultiReader magic, to have docIDs assigned in "reverse chronological order" ... > Also, for a TopN query sorted by doc-id will the query terminate early? Actually, it won't! But it really should ... you could make a Collector that throws an exception once the N docs have been collected? Mike McCandless http://blog.mikemccandless.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org