Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fulltext Index Database Searches


Winnie

Recommended Posts

Posted

We have put together a shop with 360,000 products, obviously searching this including descriptions takes 20-30 seconds on a fairly fast box (1ghz 1 gig ram etc). Adding a fulltext index with products_name and products_description takes the search time down to less than 0.5 seconds - there are certain advantages/disadvantages to this - such as common words being removed (the of in and etc) and the fact that if you type "tree" as your search term, results like "street" no longer come up.

 

Fulltext searches are only available on newer versions of mysql ... so backwards compatibility would be an issue. But during installation you could check for the version of mysql, and if it is a suitable version offer fulltext searching for large databases as a selectable option. The is it simply an change to the search results page something like if (fulltextsearch='yes') { select * from catalog match (products_name,products_description) against search_query ... etc etc obviously that wont work - but it is very easy to code.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...