-
1. Re: Please I need an Java API to implement saved-search feature.
peterj Jan 28, 2013 10:18 AM (in response to solaguide)Any tutorial on storing data in a database should do. You probably need a table with 2 or 3 columns: userid, timestamp, searchText. The timestamp is used if you want to limit the number of stored searches (remember only the last 10 searches) you will be able to determine which search to delete when the user enters the 11th search.
-
2. Re: Please I need an Java API to implement saved-search feature.
solaguide Jan 28, 2013 2:55 PM (in response to peterj)Thank you Peter. What's the benefit of limiting the number of stored searches?
-
3. Re: Please I need an Java API to implement saved-search feature.
peterj Jan 28, 2013 6:47 PM (in response to solaguide)1 of 1 people found this helpfulDo you have anyone doing the UI design work for you? UI design work is a very unique field and requires that you view the system as someone who will be using it for day-to-day tasks. That person could answer part of this question. But here is my take: How useful would the user find having all their searches saved? Let's say that the user does 20 different searches each day (yes, the user might repeat some of the searches, but let's say that 20 of the end up being unique - never used before). How many unique searches will the user have done by the end of the month? By the end of the year? After 3 years? After one month, do you really want to give to the user the last 600 searches to choose from? At that point the user won't even bother to look at the sreahces and if they are not in the top couple of slot will ignore them and just retype them. You could, of course, offer smart search completion where you reduce the selections down based on when the user types so far (much like google does). The important lesson here is to not overload the user with choices - the user can handle only so much at once. So keep the list small.
Second, why would you want to waste database space hanging onto a search item that the user hasn't used for 3 years? You might think, "no big deal, its only one entry in the table." But you have thousands of users and they each have hundreds of searches that they haven't used in over, say, three months. That could easily be 80% of the size of your db table. And the larger the db table is the slower the access. So you want to periodically purge stuff that is no longer relevant so that you search handling is performant.
-
4. Re: Please I need an Java API to implement saved-search feature.
solaguide Jan 29, 2013 5:07 PM (in response to peterj)You've said it well. You are the best. Thanks for your help and time taken.