Thursday, October 13, 2011

mysql: fulltext index

to create a fulltext in mysql

# make sure your table is a MYISAM table
ALTER TABLE maps ENGINE = MYISAM;

# create a fulltext index on your column
CREATE fulltext INDEX idx_name ON tablename(columnname);

# to search
SELECT * FROM tablename WHERE MATCH(columnname) AGAINST("+word1 +word2" IN BOOLEAN MODE);

No comments:

Post a Comment

SSH : No matching host key type found. Their offer: ssh-rsa,ssh-dss

Got this while connecting to my mikrotik router via ssh   Unable to negotiate with <ip address> port <ssh port>: no matching hos...