You are here:  » Search Problem [resolved]


Search Problem [resolved]

Submitted by philstone on Tue, 2006-03-14 16:50 in

Hi

I have discovered a problem in the script that some could maybe help me with, I uploaded a product feed for currys, using filters when uploading the material. The problem is, when you type the url:

http://www.buy24-7.net/product/PACKARD-BELL-EASYNOTE-W1801.html

- it works no problem, but when i type a search "PACKARD BELL EASYNOTE W1801" nothing comes up.

Is there something i doing wrong in the filtering?

I look forward to seeing the replies

Submitted by support on Tue, 2006-03-14 16:56

Hi Phill,

Any search for more than 2 words seems to return no results. I'll try and recreate the situation on my dev server.

Can you confirm what version of MySQL you are running (see this script if you're not sure)...

Thanks,
David.

Submitted by philstone on Tue, 2006-03-14 17:21

Hi Dave

MySQL Server Version: 4.1.13-standard

hope its a simple enough problem

regards
P Stone

Submitted by support on Wed, 2006-03-15 09:22

Hi Phill,

Still not sure what's going on in this example i'm afraid. Would you mind adding a line of code to your search.php script to reveal the SQL being used so I have study the query.

If you look for the following line in search.php:

if ($numRows = database_querySelect($sql,$rows))

And then insert the following line immediately before it:

print "<p>[".$sql."]</p>";

That will reveal the SQL so we can try and see what's going on...

Thanks,
David.

Submitted by philstone on Wed, 2006-03-15 11:05

hi dave

just added that line into search.php for you

thanks

P Stone

Submitted by support on Wed, 2006-03-15 11:09

Hi, I just saw that - thanks!

I'm afraid I should have asked you to add another bit of code to products.php as well:

Search for the following line:

$product = $rows[0];

And then add the following code immediately after that line:

print "<textarea cols='100' rows='10'>";
print_r($product);
print "</textarea>";

Apologies for the inconvenience. This will display the entire product record, and then hopefully we can explain why the SQL query on the search page is not picking it up...

Thanks,
David.

Submitted by philstone on Wed, 2006-03-15 11:28

hi dave

just added that for you

thanks
P Stone

Submitted by support on Wed, 2006-03-15 11:30

Hi,

Ok - I can see why it's not working now, it's just a question of how the search_name field has come to contain what it does. The search query is looking for:

"PACKARDBELLEASYNOTEW1801" in search_name, but search name actually contains:

"BrandPACKARDBELLModelNumberEASYNOTEW1801ShippingCost000"

You mentioned that you were using filters - can you describe what filter configuration you have registered against the Currys feed...

Thanks,
David.

Submitted by philstone on Wed, 2006-03-15 11:59

Dave

thanks so far, i have just emailed you with the full filter details for the currys feed

thanks
P Stone