Hi S,

I already had the database with some test data in it, so I had to create a script to update every text column. Changing laconica.sql and creating a correct db from scratch should work even better. Try running "show create table profile\G" in the mysql client to see if it's correct, for me it looks like this:

mysql> show create table profile\G
*************************** 1. row ***************************
      Table: profile
Create Table: CREATE TABLE `profile` (
 `id` int(11) NOT NULL auto_increment COMMENT 'unique identifier',
 `nickname` varchar(64) NOT NULL,
 `fullname` varchar(255) NOT NULL,
 `profileurl` varchar(255) default NULL,
 `homepage` varchar(255) NOT NULL,
 `bio` varchar(140) NOT NULL,
 `location` varchar(255) default NULL,
 `created` datetime NOT NULL COMMENT 'date this record was created',
`modified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP COMMENT 'date this record was modified',
 PRIMARY KEY  (`id`),
 KEY `profile_nickname_idx` (`nickname`),
FULLTEXT KEY `nickname` (`nickname`,`fullname`,`location`,`bio`,`homepage`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8

Notice I dropped the comments. :/ The show command doesn't include the collation modifier since utf8_general_ci is the default btw.

I had to drop the full-text index on the profile table to get by an error, so for that table I had two extra lines, but apart from that each table is a single sql command to change the default and then each text column, like this:

alter table profile drop index nickname;

ALTER TABLE profile DEFAULT CHARACTER SET utf8, CHANGE nickname nickname varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE fullname fullname varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE profileurl profileurl varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE homepage homepage varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE bio bio varchar(140) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE location location varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

alter table profile add fulltext index nickname (nickname,fullname,location,bio,homepage);

Another thing that sometimes gets me with MySQL fulltext matching is that it doesn't work if you only have one line in the database. You'll need a few for the statistical stuff to work properly.

Hope that helps!

MvH,


S R wrote:
Hi Olof,

can you tell me exactly what did you do to get it to run please? I changed the laconica.sql to bin8_general_ci before perform it but it is still not working for me. People search returns no any result everytime.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Laconica-dev mailing list
[email protected]
http://mail.laconi.ca/mailman/listinfo/laconica-dev

Reply via email to