Searching for products can be complicated. The intention is to always point a user to, in this case, movies that he is actually expected to see after he performs the search. But the question is what do we search for, just a movie title, or also actors in the movie, do we include a movie category or not, and so on.
This example can show that with intention to find as much movies as possible for the user, we can create such a complicated implementation that is actually very slow and makes user wait several seconds for his search results. After several slow searches, the user dissatisfaction will increase and he will probably change to another on-line movie store.
What do you need to do
- Activate the performance problem Slow Search if you did not do it already
- Go to the Shop page
- Search for movies with a keywords funny and romantic (for example)
- Go to the Next results page (if possible) by clicking the arrow.
- Analyze the results of monitoring with the inspectIT User interface
- You can perform the complete exercise again with some different search criteria
Solution hints:
- The business service method that processes the request is doSearch() in the class FulltextSearchAction class.
- How is the search performed?
- How much SQL queries are there? Are they correct?