Discussion:
[jboss-user] [Beginner's Corner] - Please I need an Java API to implement saved-search feature.
Akan Kofo
2013-01-28 00:34:50 UTC
Permalink
Akan Kofo [https://community.jboss.org/people/solaguide] created the discussion

"Please I need an Java API to implement saved-search feature."

To view the discussion, visit: https://community.jboss.org/message/794479#794479

--------------------------------------------------------------
Hi everyone,

I have been assign a task of implementing saved-search feature into our new project.
This functionality will enable user to save their searches and execute them later.
I will also be happy if someone can point me to a good tutorial on how to go about it.
Thanks in advance.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794479#794479]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Peter Johnson
2013-01-28 15:18:21 UTC
Permalink
Peter Johnson [https://community.jboss.org/people/peterj] created the discussion

"Re: Please I need an Java API to implement saved-search feature."

To view the discussion, visit: https://community.jboss.org/message/794645#794645

--------------------------------------------------------------
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.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794645#794645]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Akan Kofo
2013-01-28 19:55:48 UTC
Permalink
Akan Kofo [https://community.jboss.org/people/solaguide] created the discussion

"Re: Please I need an Java API to implement saved-search feature."

To view the discussion, visit: https://community.jboss.org/message/794717#794717

--------------------------------------------------------------
Thank you Peter. What's the benefit of limiting the number of stored searches?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794717#794717]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Peter Johnson
2013-01-28 23:47:26 UTC
Permalink
Peter Johnson [https://community.jboss.org/people/peterj] created the discussion

"Re: Please I need an Java API to implement saved-search feature."

To view the discussion, visit: https://community.jboss.org/message/794757#794757

--------------------------------------------------------------
Do 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.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794757#794757]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Akan Kofo
2013-01-29 22:07:07 UTC
Permalink
Akan Kofo [https://community.jboss.org/people/solaguide] created the discussion

"Re: Please I need an Java API to implement saved-search feature."

To view the discussion, visit: https://community.jboss.org/message/795013#795013

--------------------------------------------------------------
You've said it well. You are the best. Thanks for your help and time taken.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/795013#795013]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Loading...