Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Meilisearch 簡介

johnroyer
September 28, 2024

Meilisearch 簡介

johnroyer

September 28, 2024
Tweet

More Decks by johnroyer

Other Decks in Technology

Transcript

  1. 2 ALTER TABLE `db`.`table_name` ADD FULLTEXT `idx_name` (`content`); SELECT url

    FROM news WHERE MATCH(content) AGAINST(" 逢甲夜市 ")
  2. 11 Meilisearch • full-text indexing engine powered by Rust •

    支援多國語言 • Document based • RESTful API
  3. 14 Meilisearch curl -X POST \ 'http://localhost:7700/indexes' \ -H 'Content-Type:

    application/json' \ --data-binary '{ "uid": "movies", "primaryKey": "id" }'
  4. 15 Meilisearch [ { "id": 1, "name": " 日落 ",

    "tag": ["Linux", "COSCUP"], "programming-language": "PHP" }, { "id": 2, "name": "Shawn", "tag": ["Linux", "KaLUG", "Rust"] } ]
  5. 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 } }