Created
April 27, 2016 20:39
-
-
Save 3manuek/2146012a17c76acfa0fcbfcc229fa1c7 to your computer and use it in GitHub Desktop.
Filtering table using both default and new entries and keeping the alphabetical order
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE bookContentByLine_stopwords(value VARCHAR(30)) ENGINE = INNODB; | |
INSERT INTO bookContentByLine_stopwords | |
SELECT value FROM ( | |
SELECT value FROM | |
INFORMATION_SCHEMA.INNODB_FT_DEFAULT_STOPWORD | |
UNION | |
SELECT DISTINCT WORD as value | |
FROM information_schema.INNODB_FT_INDEX_TABLE | |
GROUP BY WORD having count(*) > 1000 | |
) allEntries | |
ORDER BY value ASC; | |
DROP INDEX ftscontent ON bookContentByLine; | |
SET GLOBAL innodb_ft_server_stopword_table = 'ftslab/bookContentByLine_stopwords'; | |
CREATE FULLTEXT INDEX ftscontent ON bookContentByLine(content); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment