But, I think it should be possible with some fun codec & merge policy & MultiReader magic, to have docIDs assigned in "reverse chronological order"
Can you explain it a bit more? I was thinking perhaps we store absolute doc-ids instead of delta to do reverse traversal. But this could waste a lot of storage The default merge policy will merge adjacent segments no? Is it going to disturb the ordering? -- Ravi On Tue, Nov 20, 2012 at 5:19 PM, Michael McCandless < luc...@mikemccandless.com> wrote: > 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 > >