• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Joe Ess

How does 'search' feature work in a website?  RSS feed

Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I develop a similar healthcare application, there is a search button that finds among "Hospitals, Doctors, Blogs, Specialities, Treatments, Events, Jobs, Testimonials".
I want to know how will this fetch one thing out of all the corresponding tables?
What query will be triggered?
Will it search through all tables one by one?
How would you do this if you had to build such a feature in your application?

Thanks in advance.
[Thumbnail for 2018-07-14-18-47-www.maxhealthcare.in-(1).png]
Healthcare website search button
Posts: 19668
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's entirely up to you. The search entry on a webpage is often in a mini-form independent of whatever other form(s) might be on the page - especially when you're talking validating frameworks such as JSF, where a form cannot be accepted if any other value in the form is invalid.

You attach that form to backing logic that takes the data that was entered and searches according to whatever rules you wish. It could be a simple SQL query, a set of queries on multiple tables or a free-form search. In the case of free-form text queries like the forum search feature on the JavaRanch, it's common to use an engine such as Apache Lucene.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!