Slide 1

Slide 1 text

1 SELECT url FROM news WHERE content like "% 逢甲夜市 %"

Slide 2

Slide 2 text

2 ALTER TABLE `db`.`table_name` ADD FULLTEXT `idx_name` (`content`); SELECT url FROM news WHERE MATCH(content) AGAINST(" 逢甲夜市 ")

Slide 3

Slide 3 text

3 全文檢索

Slide 4

Slide 4 text

4 Fang Chia night market ^ ^ ^

Slide 5

Slide 5 text

5 Fang Chia night market Fang Chia Fang Chia night market .....

Slide 6

Slide 6 text

6 逢甲夜市 逢 甲 夜 逢甲 夜市 逢夜 逢市 (N-gram)

Slide 7

Slide 7 text

7 中研院中文斷詞 (CKIP) https://ckip.iis.sinica.edu.tw/service/ckiptagger/

Slide 8

Slide 8 text

8 台灣即日起進入「排碳有價」時代,全台計有 281 家 企業、 500 間廠家須繳碳費,佔全國溫室氣體排放量 約 54% ,以鋼鐵、石化、半導體等產業為大宗。 範例

Slide 9

Slide 9 text

9 基努李維被問及對於真除代理執行長廖達琪的可能結 果,蔡明忠表示,不做多想,但期盼還是盧業中擔任 執行長 範例

Slide 10

Slide 10 text

10 Meilisearch

Slide 11

Slide 11 text

11 Meilisearch ● full-text indexing engine powered by Rust ● 支援多國語言 ● Document based ● RESTful API

Slide 12

Slide 12 text

12 Meilisearch

Slide 13

Slide 13 text

13 Meilisearch curl -X GET \ http://127.0.0.1:7700/indexes

Slide 14

Slide 14 text

14 Meilisearch curl -X POST \ 'http://localhost:7700/indexes' \ -H 'Content-Type: application/json' \ --data-binary '{ "uid": "movies", "primaryKey": "id" }'

Slide 15

Slide 15 text

15 Meilisearch [ { "id": 1, "name": " 日落 ", "tag": ["Linux", "COSCUP"], "programming-language": "PHP" }, { "id": 2, "name": "Shawn", "tag": ["Linux", "KaLUG", "Rust"] } ]

Slide 16

Slide 16 text

16 Meilisearch curl -X GET \ http://127.0.0.1:7700/index/people/stats { "numberOfDocuments": 2, "isIndexing": false, "fieldDistribution": { "id": 2, "name": 2, "programming-language": 1, "tag": 2 } }

Slide 17

Slide 17 text

17 Meilisearch curl -X POST 'http://localhost:7700/indexes/people/sear ch' \ -H 'Content-Type: application/json' \ --data-binary '{"q": "rust"}'

Slide 18

Slide 18 text

18 實際案例

Slide 19

Slide 19 text

19 Meilisearch https://zeroplex.tw

Slide 20

Slide 20 text

20 實際案例 新聞搜尋工具: ● 文字約 3 GB ● 數量約 140 萬筆 ● 索引檔大小約 30 GB