implementing a search box - best practices
I'm implementing a simple search box, to allow visitors to search for merchandise, which is held in a table. I can see two main approaches, each with their pro's and cons:
:
The merchandise data has several fields that could be potentially employed in the search. long description, short description and title.
A thorough search would look through each long description field, which is 100 chars long. The downside being the speed hit, searching such a large field.
A quick search would look through the title field - quick but not thorough
Alternatively I could create a separate table, searchTags, which contains a list of keywords for each item of merchandis - quicker but not as thorough
Just wondering what type of apporach people use ?