On Dec 1, 2004, at 11:31 AM, Luke Francl wrote:
I do a similar thing, creating a List of asset references from a field
in each Lucene Document in my Hits list (actual data for display
retrieved from a separate datastore). I was not aware of any performance
problems from doing this, but now I am wondering about the implications.

The performance "concern" (lets not say "problem") is when you get 10,000,000 (or so :) results back from a search. No user wants to see all of that, only the first 20, perhaps. Calling Hits.doc(i) pulls the document data from the index and populates a Document instance. There is file I/O involved, and doing lots of unnecessary Hits.doc(i) calls may potentially be noticeable. If you're only getting 100 hits back then you'll likely not even notice. (all numbers quoted here are just random figures - don't quote me on actual performance numbers :).


In my current application, I have a paging feature. Each new page does a search again using the same query, but I only iterate through the 20 that should display on that page and build a highlighted data structure to hand to the presentation of only the appropriate ones for the range.

        Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to