Site search finally available
I’ve finally got around to adding a search page to this site. It uses MySQL’s full text indexing, which is extremely fast and provides good results but comes at the expense of flexibility. Search terms less than 4 letters long are ignored, and multi-word searches are handled using OR rather than AND. This nearly put me off using it, but the relevancy algorithm is excellent which I think outweighs the disadvantage of not being able to use pure AND queries.
MySQL 4.0 introduces far more powerful boolean mode full text searches which allow all kinds of modifiers and extra syntax, but this site currently runs on 3.23.54 so I can’t play with those just yet. Jeremy Zawodny’s article on MySQL 4 explains boolean mode and describes many other exciting new MySQL features as well.
MATCH (field) AGAINST (term1, term2) > 0(which is an OR query), you do:MATCH (field) AGAINST (term1) > 0 AND MATCH (field) AGAINST (term2) > 0. Obviously this is going to be a little slower but it isn't noticeable.Tim - 25th April 2003 17:42 - #
Richard Hulse - 25th April 2003 22:42 - #
michel v - 27th April 2003 12:59 - #
Pepino - 13th May 2003 20:51 - #