I'm using own TimerHashtable class for that. The key for storing Hits in it is a concatenated String out of search query and index(database) id. If your search will only run through the only database(index), the key for Hashtable could be the only search query.
To avoid system overhead with a lot of entries, TimerHashtable runs a Timer thread for each entry that has been created in it and removes those which not have been accessed within last N(customizable) minutes. If Hits have been accessed before the N ends, then Timer restarts again. No session management I ever used. Maxim p.s. For implementing search I'm using Lucene search engine http://jakarta.apache.org/lucene/index.html -- Original message -- From: "Sudarson Roy Pratihar" <[EMAIL PROTECTED]> Date: Tuesday, February 05, 2002, 3:28:58 PM Subject: How Pagination can be handled optimally ? SRP> Thanks for the reply. but my question is where will u cache that ? Are u SRP> going to put in the session ? Then it may be an overhead to system. SRP> Can pls give me some more detail on this ? SRP> Thanking u for the help, SRP> Regards, SRP> Sudarson SRP> -----Original Message----- SRP> From: Maxim Patramanskij [mailto:[EMAIL PROTECTED]] SRP> Sent: Tuesday, February 05, 2002 6:33 PM SRP> To: [EMAIL PROTECTED] SRP> Subject: Re: How Pagination can be handled optimally ? SRP> Hello Sudarson, SRP> one of possible ways( at least I am using it) is using a searcher SRP> class, which will implement the search over your databases or indexes SRP> and store all hits(search results) in an instance of, say Hits, class SRP> allowing you SRP> iterate through them. You can cache it to avoid redundant search process SRP> if SRP> you want to see "next N results" and just ask your cached Hits SRP> object for next N hits, following from the last displayed. SRP> Maxim SRP> -- Original message -- SRP> From: "Sudarson Roy Pratihar" <[EMAIL PROTECTED]> SRP> Date: Monday, February 04, 2002, 1:09:02 PM SRP> Subject: How Pagination can be handled optimally ? SRP>> Hi All, SRP>> The pagination is very common feature of any web application. When SRP> we SRP>> have search screen or summary screen, we can have a lots of search SRP>> result and we may want to show the result page wise. Now how this SRP> can be SRP>> done optimally ? B'coz say in search we get 1000 records and we SRP> want to SRP>> show the result sorted alphabetically and 10 per page. Now what are SRP> the SRP>> ways we can achieve that and which one is the optimal solution ? SRP>> Any suggestion is welcome. SRP>> TIA, SRP>> Sudarson SRP>> SRP> ________________________________________________________________________ SRP> ___ SRP>> To unsubscribe, send email to [EMAIL PROTECTED] and include in SRP> the body SRP>> of the message "signoff SERVLET-INTEREST". SRP>> Archives: SRP> http://archives.java.sun.com/archives/servlet-interest.html SRP>> Resources: SRP> http://java.sun.com/products/servlet/external-resources.html SRP>> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html SRP> ________________________________________________________________________ SRP> ___ SRP> To unsubscribe, send email to [EMAIL PROTECTED] and include in the SRP> body SRP> of the message "signoff SERVLET-INTEREST". SRP> Archives: http://archives.java.sun.com/archives/servlet-interest.html SRP> Resources: http://java.sun.com/products/servlet/external-resources.html SRP> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
