Bonesnap;10996295 wrote:My guess is the IN BOOLEAN MODE modifier is affecting it in some way. The MySQL manual doesn't mention periods, but it does say certain characters have special meaning when this modifier is used.
Thank You for pointing this out, I made some progress.
Manual says:
A phrase that is enclosed within double quote (“"”) characters matches only rows that contain the phrase literally, as it was typed.
So I've tried this:
SELECT DISTINCT(product_id), *,
(0.7 * ( MATCH (product_id)
AGAINST('"PROD645.46.759"' IN BOOLEAN MODE)) +
(0.1 * (MATCH (description)
AGAINST ('"PROD645.46.759"' IN BOOLEAN MODE)))) AS Relavance
FROM MY_TABLE
WHERE ( MATCH (product_id,description)
AGAINST('"PROD645.46.759"' IN BOOLEAN MODE)) >= 1
And it brings up only the product i searched for.
But here's another strange thing.
Inside every description I've got product_id without the preceding PROD, like so:
My description text, 164.354.821, some more description text.
Now when searching for 164.354.821, I get no results.
Does the comma affect anything perhaps?