Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FullText Search Not Reliable 1

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
Ok I have a database table, with some records in it, two fields make and model are both indexed as fulltext searchible ( together ).

(MySQL 4.*, PHP 4.*, Apache, on a *nix server)

Heres a Scenario, say Make is "Chevy", so I do a search for chevy using the following Mysql Statement.

Code:
select id, vin, make, model, year, price from inventory Where MATCH (make, model) AGAINST ('chevy')  order by id

which does not work unless I throw in

Code:
 IN BOOLEAN MODE

right after 'chevy', so figured ok so using that makes it work.

But then I run into a problem, I have a record where the make name is "BMW", and the model is "M5"

however if I search by means of

Code:
select id, vin, make, model, year, price from inventory Where MATCH (make, model) AGAINST ('BMW' IN BOOLEAN MODE)  order by id

or even

Code:
select id, vin, make, model, year, price from inventory Where MATCH (make, model) AGAINST ('M5' IN BOOLEAN MODE)  order by id

or even

Code:
 select id, vin, make, model, year, price from inventory Where MATCH (make, model) AGAINST ('BMW M5' IN BOOLEAN MODE)  order by id

no results are returned even tho as clear as daylight, there exist a name inside of a make, ad inside of the model on both if not even by themselves.

Karl Blessing
PHP/MySQL Developer
 
This would be far better posted in the mysql forum

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Oh incidentally, if a keyword searched appears in more than 50% of the table, it wil be ignored and no results will be returned, in which case you'd need to use boolean searches.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
heres the manual, - you need to look through and see what is most appropriate, also see tuning fulltext searches and boolean ..
But I don't know much about them. Have fun :)

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top