https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-all-titles-in-ns0.gz
- docker pull mysql
- docker run --name mysql -p3307:3306 -e MYSQL_ROOT_PASSWORD=testadmin -e MYSQL_USR=wikitest -e MYSQL_PASSWORD=wikitest -e MYSQL_DATABASE=WIKI_TEST -d mysql
- mysql -h127.0.0.1 -uroot --port=3307 -ptestadmin
- CREATE TABLE TITLES (PAGE_TITLE VARCHAR(1000) PRIMARY KEY);
- ALTER TABLE TITLES ADD FULLTEXT INDEX FT_IDX (PAGE_TITLE);
- load data local infile '<data_path>/enwiki-latest-all-titles-in-ns0'
into table WIKI_TEST.TITLES
fields terminated by ','
enclosed by '"'
lines terminated by '\n'
IGNORE 1 LINES
(PAGE_TITLE);
- mvn clean package
- java -jar target/server-0.1.0-fat.jar
- curl -i 'http://localhost:8080/wikiTitle?name=Thread'
- curl -i 'http://localhost:8080/wikiPage/Thread(OS)'