• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

Ranch Hand
Posts: 176
  • 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: 20310
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.
What's wrong? Where are you going? Stop! Read this tiny ad:
Enterprise Java integration with Delphi and Free Pascal applications - new release 2019.02
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!