MySQL query sometimes worsks

wjh2303

New Member
Messages
139
Reaction score
0
Points
0
I have a small table with about 20 entries, each entry has a cell containing a set of tags, made searchable by the FULLTEXT command thingy, so that i can search by tag using MATCH() AGAINST().

However, when i search by tag, some of them seem to work, and others not, i.e when i search for the tag 'city' it returns all the entries tagged city correctly, but when i seach for another tag, 'arch' for example, i get no results, when there are definately some rows with that tag. This happens both on a php page and through phpmyadmin.

Any ideas? help appreciated! thanks.
 

akkudreamz

New Member
Messages
183
Reaction score
0
Points
0
Code:
A few restrictions affect MySQL FULLTEXT indices. Some of the default behaviors of these restrictions can be changed in your my.cnf or using the SET command. 
FULLTEXT indices are NOT supported in InnoDB tables.
MySQL requires that you have at least three rows of data in your result set before it will return any results.
By default, if a search term appears in more than 50% of the rows then MySQL will not return any results. 
By default, your search query must be at least four characters long and may not exceed 254 characters.
MySQL has a default stopwords file that has a list of common words (i.e., the, that, has) which are not returned in your search. In other words, searching for the will return zero rows.
According to MySQL's manual, the argument to AGAINST() must be a constant string. In other words, you cannot search for values returned within the query.
 

wjh2303

New Member
Messages
139
Reaction score
0
Points
0
that looks helpfull, ill try and work on some of the aspects mentioned there, may i ask your source incase it is usefull in furture?
Edit:
Thanks, thats working now, some of the tags were too short, so i lengthened them and that worked, and one of the tags was in over 50% of the rows, so adding some empty filler rows so they were less than 50% solved that
 
Last edited:
Top