Andy
20-05-09, 16:27
Not a joke, sorry if I mislead.
Basically the problem Im having is this:
I have a Lingerie site with some pages populated using a search for "bras".
DIY Tools products are appearing, which baffled me for ages, until I started thinking about database searching.
Here's some products that are appearing on my "Bras" pages:
Multisharp 1205 Spare Abrasive Pack 14"
Multi-sharp 1204 Spare Abrasive Pack 12in
Multi-sharp 1205 Spare Abrasive Pack 14in
Can you see it?
in a MySQL "LIKE" search, these would appear for: WHERE `prodname` LIKE '%bras%'
This basic LIKE search has been a problem for me in the past, and I got round it by thinking about the intent of the search.
If I was searching for "Bras" I would use a LIKE '% bras %' query
Yes this would filter out any "Bras for women" prodnames, but would allow "Black Bras for women" without the possibility of "Multi-sharp 1205 Spare Abrasive Pack 14in" showing up.
To get round the "Bras for women" problem, I log all titles as " Bras for women ", ie with a leading and trailing whitespace, and trim() it before it gets to the page. That way I know I'm getting results for actual word matches instead of part word matches.
Not that Im suggesting SW uses something as basic as LIKE, Im just using it as an example.
Anyhoo, any chance a fix for this is in the pipeline? Anti-RBs would do nicely ;)
Basically the problem Im having is this:
I have a Lingerie site with some pages populated using a search for "bras".
DIY Tools products are appearing, which baffled me for ages, until I started thinking about database searching.
Here's some products that are appearing on my "Bras" pages:
Multisharp 1205 Spare Abrasive Pack 14"
Multi-sharp 1204 Spare Abrasive Pack 12in
Multi-sharp 1205 Spare Abrasive Pack 14in
Can you see it?
in a MySQL "LIKE" search, these would appear for: WHERE `prodname` LIKE '%bras%'
This basic LIKE search has been a problem for me in the past, and I got round it by thinking about the intent of the search.
If I was searching for "Bras" I would use a LIKE '% bras %' query
Yes this would filter out any "Bras for women" prodnames, but would allow "Black Bras for women" without the possibility of "Multi-sharp 1205 Spare Abrasive Pack 14in" showing up.
To get round the "Bras for women" problem, I log all titles as " Bras for women ", ie with a leading and trailing whitespace, and trim() it before it gets to the page. That way I know I'm getting results for actual word matches instead of part word matches.
Not that Im suggesting SW uses something as basic as LIKE, Im just using it as an example.
Anyhoo, any chance a fix for this is in the pipeline? Anti-RBs would do nicely ;)