On Sep 17, 2008, at 11:51 AM, Cam Bazz wrote:
And how about queries that need starting position, like hits between 100 and 200? could we pass something to the collector that will count between 0 to 100 and then get the next 100 records?
The collector uses a Priority Queue to store doc ids and scores as they are collected. All the collector knows is the document id and the score and, presumably what it has seen so far, to some extent. Ordering is not defined until all the candidate docs have been scored.
If you expect to do a lot of paging on a given set of results, I could imagine using an approach whereby you don't bother to insert entries if you've already seen them and could maybe save on some queue operations, but not sure how well it would work.
The other thing to do is just ask for slightly more than you think you will need in the first query, but it depends on your users. Most users, in my experience, don't go beyond page 2 or 3 at most, so you could consider paying the cost to get the top 30 or 50 and caching that for your paging. If you have other application specific knowledge, you can then adjust as appropriate.
-Grant --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]