You are here:  » Search error ?


Search error ?

Submitted by Peter on Wed, 2006-10-11 21:57 in

Hello David,

i don´t know if this is an search error by script, or the search word is used like "bw:"

I have many products with the word "Think". But when i search for this word, i get no results.

Here ist one of the products: Think product

If You need the searchform and search.php, here they are:

Sry, can´t post the code. I get always the error "Terminated request because of suspicious input data."

Thanks, Peter

Submitted by support on Thu, 2006-10-12 07:49

Hi Peter,

If a word appears in more than 50% of indexed items it is not indexed using MySQL's FULL TEXT method - and this is probably what is happening in this case. The only alternative is to resort back to the non full text index method and search using a basic LIKE clause; but this means that your users have to search for products exactly as they are written, and with words and model numbers in the correct order.

The basic search method is always used for queries of up to 3 characters, but you can make it the default by changing the following line in search.php

if (strlen($parts[0]) > 3)

to...

if (0)

That effectively disables the full text search; but based on other users experience trying this I would recommend staying with the full text index as the best solution...

Cheers,
David.