[Cialug] different result while searching with FULLTEXT and LIKE?
afan pasalic
afanpasalic at yahoo.com
Wed Jan 30 16:17:40 CST 2008
hi,
I have table "tasks"
create table tasks(
task_id, int(4) not null primary key,
task text not null,
resolution text not null,
fulltext (task, resolution)
)engine=myisam
> select count(*) from tasks match(task,resolution) against('"certain service"' in boolean mode)
result: 1
> select * from tasks where task like '%certain service%' or resolution like '%certain service%'
result: 2 .
> select count(*) from tasks match(task,resolution) against('+certain +service' in boolean mode)
result: 232
> select * from tasks where (task like '%certain%' and task like '%service%') or (resolution like '%certain%' and resolution like '%service%')
result: 7
> select count(*) from tasks match(task,resolution) against('certain')
result: 0
> select count(*) from tasks where task like '%certain%' or resolution like '%certain%';
result: 173
just in case, I restarted mysql server and "repaired" the table
> repair table tasks quick;
still the same.
what I'm doing wrong?
thanks.
-afan
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20080130/185baf1b/attachment.htm
More information about the Cialug
mailing list