JIgar writes:
> I am working on an application which will be like a search engine, the
> search is done on an Oracle database, [...]
> we would like to give an option to ther user to restrict his search
> results to a particular number and provide a button to go the next
> results as we have in common search engines [...]
> How can i store the resultset from database and get the next results.
Obviously the feasibility of this depends on the size of the
database, the size of the usual search results, how many searches you
get, etc, BUT...
One simple way would be to have a "search cache" server that the
servlet sends search requests to. The search cache hits the database,
takes the results, stores them in a hashtable keyed by the search
parameter string, and returns the full results to the servlet. The
servlet trims the results down and sends them to the user. For
subsequent searches, the servlet sends the same search parameters to
the search cache, the search cache checks its hashtable and returns
the same search.
I'm sure there are database packages out there that do some level
of caching along these lines, and I know that various popular search
engines have features that display searches people are currently
asking for and most popular searches, probably using a similar
mechanism. Whether it's wiser to use a cache that is built into the
database or build your own in the servlet engine is another question.
Steven J. Owens
[EMAIL PROTECTED]
[EMAIL PROTECTED]
___________________________________________________________________________
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