There are 2 search methods used by the script. If all words in the query contain more than 4 letters the Full Text index is used (MySQL's Full Text index does not include words less than that length); otherwise a basic LIKE query is used.
The full text index is built against the "name" field (the same field that is displayed throughout the script), whereas the basic search method uses the search_name field, so that any spaces entered by the user are not counted.
It helps to exclude spaces, because a product might have a common model number, say "ABC 123", but many people would search for this as ABC123 - so by excluding spaces both versions would return the desired result.
If you want to see how this is worked out in the code, look in search.php around about lines 63 - 102...
Hi,
There are 2 search methods used by the script. If all words in the query contain more than 4 letters the Full Text index is used (MySQL's Full Text index does not include words less than that length); otherwise a basic LIKE query is used.
The full text index is built against the "name" field (the same field that is displayed throughout the script), whereas the basic search method uses the search_name field, so that any spaces entered by the user are not counted.
It helps to exclude spaces, because a product might have a common model number, say "ABC 123", but many people would search for this as ABC123 - so by excluding spaces both versions would return the desired result.
If you want to see how this is worked out in the code, look in search.php around about lines 63 - 102...
Cheers,
David.