I was just wondering what setting a row to fulltext did in mySQL.
Thanks in advance,
CoW
What does 'fulltext' do?
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
-
SL-Cowsrule
- Forum Newbie
- Posts: 13
- Joined: Sat Oct 12, 2002 5:08 pm
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
-
SL-Cowsrule
- Forum Newbie
- Posts: 13
- Joined: Sat Oct 12, 2002 5:08 pm
It's used with the MATCH function to be able to search for words (case-insensitive) in all of the columns specified in the FULLTEXT index. The MATCH function will return a "relevance" value that is an attempt to quantify how relevant the target word is to that row in the table. I'm sure you've seen this type of behavior in some internet search engines.
Using the docs' example:
will return all rows from the ARTICLES table whose TITLE or BODY columns contain the word "database", assuming a FULLTEXT index is defined on the (TITLE,BODY) columns.
If you do plan on using MATCH, though, it will definitely help you to understand the docs since the function has some complex behaviours (like the 50% threshhold) that could be quite unexpected. Basically it comes down to the fact that it is designed for searches on a large number of rows, and so using it on small tables might not return useful results.
Using the docs' example:
Code: Select all
SELECT * FROM articles
WHERE MATCH (title,body) AGAINST ('database');If you do plan on using MATCH, though, it will definitely help you to understand the docs since the function has some complex behaviours (like the 50% threshhold) that could be quite unexpected. Basically it comes down to the fact that it is designed for searches on a large number of rows, and so using it on small tables might not return useful results.
-
JPlush76
- Forum Regular
- Posts: 819
- Joined: Thu Aug 01, 2002 5:42 pm
- Location: Los Angeles, CA
- Contact:
I'm using it for my company's website now (the fulltext searching) and its got some issues that make me a little unhappy....
Mainly it doesn't search on words 3 letters or less, which makes it difficult to find things in searches even if that 3 letter word is unique.
Also, since it deals with relevance if I search on "KODAK FILM"
I get at the top everything with Kodak and Film , then I get everything with either kodak or film in the description. Now you're talking about tons of pages being returned.
I think I'm just going to rewrite it after we go live to handle these issues.
Mainly it doesn't search on words 3 letters or less, which makes it difficult to find things in searches even if that 3 letter word is unique.
Also, since it deals with relevance if I search on "KODAK FILM"
I get at the top everything with Kodak and Film , then I get everything with either kodak or film in the description. Now you're talking about tons of pages being returned.
I think I'm just going to rewrite it after we go live to handle these issues.