Here's the CREATE TABLE:
CREATE TABLE `EntityAddresses` (
`EntityAddress_ID` int(11) NOT NULL AUTO_INCREMENT,
`Entity_ID` int(11) NOT NULL,
`CreateDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`CreatedBy` int(11) NOT NULL,
`UpdateDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`UpdatedBy` int(11) NOT NULL,
`StreetAddress` varchar(150) NOT NULL DEFAULT '',
`StreetAddress2` varchar(150) NOT NULL DEFAULT '',
`City` varchar(50) NOT NULL DEFAULT '',
`State` varchar(50) NOT NULL DEFAULT '',
`PostalCode` varchar(30) NOT NULL DEFAULT '',
`Country` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`EntityAddress_ID`),
KEY `Entity_ID` (`Entity_ID`),
KEY `CreatedBy` (`CreatedBy`),
KEY `UpdatedBy` (`UpdatedBy`),
FULLTEXT INDEX `EntityAddresses_ibft_1` (`StreetAddress`,`StreetAddress2`,`City`,`State`,`PostalCode`,`Country`),
CONSTRAINT `EntityAddresses_ibfk_1` FOREIGN KEY (`Entity_ID`) REFERENCES `Entities` (`Entity_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `EntityAddresses_ibfk_2` FOREIGN KEY (`CreatedBy`) REFERENCES `Users` (`User_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `EntityAddresses_ibfk_3` FOREIGN KEY (`UpdatedBy`) REFERENCES `Users` (`User_ID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Here's an example record:
EntityAddress_ID: 5908
Entity_ID: 4514
CreateDate: 2015-05-25 13:59:43
CreatedBy: 2
UpdateDate: 2015-05-25 13:59:43
UpdatedBy: 2
StreetAddress: Testing 123
StreetAddress2:
City: Singapore
State:
PostalCode:
Country: SG
Here's the query that should return the example record above:
SELECT
*
FROM
`EntityAddresses`
WHERE
MATCH (`StreetAddress` , `StreetAddress2` , `City` , `State` , `PostalCode` , `Country`) AGAINST ('+SG' IN BOOLEAN MODE);
When I try the same query with "Singapore" in place of "SG", it returns a result set including the example record above, but "SG" returns nothing. I have tried other countries and I'm getting the same result, 0 rows.