CREATE TABLE posts (
- id INTEGER PRIMARY KEY NOT NULL,
+ id INT PRIMARY KEY AUTO_INCREMENT,
commiter TEXT NOT NULL,
commiter_type INTEGER NOT NULL default 1,
fb_post_id INTEGER UNIQUE NOT NULL,
prefix TEXT NOT NULL,
suffix TEXT NOT NULL,
post_time INTEGER NOT NULL
-);
+) ENGINE = mroonga DEFAULT CHARSET utf8;
create index posts_fb_post_id_idx on posts(fb_post_id);
create index posts_post_time_idx on posts(post_time);
+create fulltext index uri_idx on posts(uri);
+create fulltext index prefix_idx on posts(prefix);
+create fulltext index suffix_idx on posts(suffix);
+create fulltext index msg_idx on posts(prefix,uri,suffix);
+