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

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.
2018-07-14-18-47-www.maxhealthcare.in-(1).png
[Thumbnail for 2018-07-14-18-47-www.maxhealthcare.in-(1).png]
Healthcare website search button
 
Bartender
Posts: 19807
93
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!