I have just set up a full text index on my MySQL database, but unfortunately it's not returning any results.
This seems to be a common issue, and the typical answers are use the MyISAM engine, and the 'IN BOOLEAN MODE' function. Well neither of these seem to work for me.
Here is my example code:
DROP TABLE IF EXISTS parentregionlist;
CREATE TABLE parentregionlist
(
RegionID INT NOT NULL,
RegionType VARCHAR(50),
RelativeSignificance VARCHAR(3),
SubClass VARCHAR(50),
RegionName VARCHAR(255),
RegionNameLong VARCHAR(510),
ParentRegionID INT,
ParentRegionType VARCHAR(50),
ParentRegionName VARCHAR(255),
ParentRegionNameLong VARCHAR(510),
CountryCode VARCHAR(2),
TimeStamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (RegionID),
FULLTEXT (RegionNameLong)
) ENGINE = MyISAM;
INSERT INTO parentregionlist
VALUES (575,
"City",
"",
"",
"Birmingham",
"Birmingham, England, United kingdom",
6023342,
"Multi-City (Vicinity)",
"Birmingham (and Vicinity)",
"Birmingham (and vicinity), England, United Kingdom",
"",
now());
SELECT *
FROM parentregionlist
WHERE MATCH(regionnamelong)
AGAINST ('Birm' IN BOOLEAN MODE);
Any ideas?
P.S. In the real table I have 200k+ rows. I know the search won't work with just one row, it's just an example.