9 February 2007

mysql fulltext remember 50% threshold

after beating my head and wondering why my search wasn’t working… low and behold it was the a threshold problem…

I was creating a search, and had a table of 3 rows … and I was literally pulling out hairs. why why why ... then dawned on me AND i feel like a total idiot … mysql FULLTEXT search has a 50% threshold …

If your search returns more than 50% of the rows, then nothing is returned …

And while i have you here … also remember about stop words which will be ignored and also words less than 4 characters

summarizing:
FULLTEXT will save you from writing complex sequence of LIKE or RLIKE and works very well BUT just remember about STOP WORDS and 50% THRESHOLD and that 3 LETTER WORDS are ignored ...

 

comment

There is a way to adjust the threshold. If you already know this have you had any luck trying to change this on dreamhost? Thank man

2008-03-10
randy

There is a way, and I haven’t played around with it on dreamhost . My guess would be no… but here is documentation on tuning MySQL.

11.8.6. Fine-Tuning MySQL Full-Text Search

2008-03-10
Daniel Bulli2


note: you can only submit after you hit preview


nuff-respec is a weblog written by daniel bulli a senior web programmer in boston, ma.
more >

contact | resume | profile | twitter

recently :::