So, I have two somewhat unusual questions that I hope you people can help me with.
First, I am implementing a sort of 'live search' bar in my application, much like spotlight search on macs, which will display search results as the user types each letter. The setup is such that it fires off a '%like%' query every time the user types a key. Because it is set up this way, the result set of every query will be a subset of the result set of the previous query (as long as the user doesn't delete characters). I was wondering if there was a way to cache the search results or tell hibernate that I'm going to be firing off a bunch of queries with nested results sets. I've looked into the second level cache, but I'm not sure if that's exactly what I want. Maybe that's all there is, but I was just wondering.
Secondly, I was wondering if there was any way to get 'gradual' search results. This idea is also based off of the spotlight search, where search results don't appear all at once, but (presumably) as they are found. I've thought about limiting the number of results returned/pagination, and running multiple queries, but that would be less than ideal. The thing is, the application I'm writing is going to be for extremely low end computers (in the 300 dollar range), and It would be nice if the users would get some results quickly, and more detailed results later.
Thanks a mill.
|