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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fulltext indexs and searching troubles

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello everybody,

I'm trying to set up a small search method for my database,
I've followed the instructions at mysql.com about fulltext indexs etc.

now this line works

select * form data where match (name,town,area) against ("north");

however this line doesn't

select * form data where match (name,town,area) against ("nor*");

Anyone got any ideas? or know of a easier way of searhing a mysql db (i don't want to use - where like '%searchstring%')?

Cheers

Resis
 
Character matches in mySQL are not * (this is a numeric operator) the regexp operators for characters are % which is any character and _ which is any single character. ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
But is it possible to use operators like % or _ in a full text querry? I doesn't seem to work...
 
OK several points. firstly what Iposted was worng.
in FULLTEXT searching, * is permitted as a wildcard.

secondly , and possible relevant is this exceprt from the user contibuted notes on fulltext searches at mysql.com:

MATCH (body,title) will only work if you have an
index on both fields together - something created
like this:
ALTER TABLE some_tbl ADD FULLTEXT (body,title);
It will not work if you have an index on each
of 'body' and 'title' separately.

select * form data where match (name,town,area) against ("nor*");

will not work as you need to change form to fRom :)

hope this helps.
______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
I am a newbies for mySQL. Is the query not working because the "form" instead of "from"?

-------------------------------------
select * form data where match (name,town,area) against ("north");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top