britske wrote:
>> *If* you could query on internal docid (I'm not sure that it's available
>> out-of-the-box, or if you can at all)
>> your original problem, quoted below, could imo be simplified to asking for
>> the last docid inserted (that match the other criteria from your use-case)
>> and in the next call filter from that docid forward.
>
>that sounds great, is there really a way to do that?

I don't know about internal docids, but no reason you can't use that same 
technique with timestamps, if you want to do the 
two-query-remember-30-minutes-agos-last-doc approach. 

Query for latest timestamp by sorting by timestamp descending, set rows=1, the 
row you get back has the greatest timestamp. 

30 minutes later, query with fq=timestamp>that_one_we_remembered. 

Would this be any slower with timestamps than with docids?  I don't think so, 
but one way to find out. 

Also, with any sorting, you probably might want to include a warming query that 
sorts by the column you are going to be sorted on. I haven't figured out yet if 
a warming query that sorts on a field will help speed up later range-queries 
(rather than just later sorts) on that field too, but I'm thinking it might.  

Jonathan

Reply via email to