Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Search Engine in Rust
Search
Kentaro Matsumoto
July 16, 2019
Programming
510
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Search Engine in Rust
Rust実装の検索エンジンについてまとめました。2019/07/16
Kentaro Matsumoto
July 16, 2019
Transcript
18 slides
Search Engine in Rust 2019/07/16 Shinjuku.rs #5 @FORCIA
松本健太郎/@matsu7874 • フォルシア株式会社 エンジニア • インメモリデータベースの開発 ◦ Rustを使用
目次 1. 全文検索エンジン 2. 全文検索エンジンライブラリTantivy
Rust実装の全文検索エンジン
Rustの全文検索エンジン Project Star Contributors Sonic 6887 19 Toshi 2184 14
Rusticsearch 167 1 MeiliDB 133 6
Sonic • RocksDBに依存 ◦ facebookが開発しているkey-value store • 商用利用実績あり!
Toshi • Tantivyを使用 ◦ full-text search engine library • far
from production ready
Rusticsearch • RocksDBに依存 • 開発停止→toshiを見てね
MeiliDB • RocksDBに依存 • meiliというフランスの会社が開発 • beta版でクライアントを探している?
全文検索エンジンライブラリ Tantivy
Tantivy • 全文検索エンジンライブラリ ◦ Apache Lucene的な ◦ 高速な転置インデックスを提供する • 更新も出来るよ
• @fulmicotonさん中心に開発
なんで速いの? • FSTで辞書引き ◦ 有限状態トランスデューサー • delta-encoding ◦ 前の要素との差分を保存する •
bit pack ◦ 5とか7とかは3bitでよくね? ◦ メモリに載るぜ!
インデックス構造 • WORM: write-one-read-many • segmentという小単位で保存 ◦ これは上書きしない
更新もできるの? • add_document, delete_term • 処理はQueueに貯めていく ◦ QueueはRwLock
once_cell::sync::Lazy; • 1回与えられたら、更新されない
Tutorialが簡単 • 500万行8GBのWikipediaデータ • 4並列でindex `-t`オプション • 10分くらいでインデックスできる
Exampleが充実 • custom_tokenizer • custom_collector • update • stop_words
実装が見やすい • 読むべし
More Decks by Kentaro Matsumoto
See All by Kentaro Matsumoto
AIで仕事のやり方を変える
matsu7874
3
1.6k
claude_code.pdf
matsu7874
5
7.8k
Marpを使って登壇資料を作る
matsu7874
0
2.5k
Generate a rust client code by OpenAPI Generator
matsu7874
0
850
ざっと理解するRust 2024 Edition
matsu7874
0
2k
プリントデバッグを失敗させないテクニック
matsu7874
1
520
社外を巻き込んだ勉強会を定期開催するコツ
matsu7874
0
270
actix-webを使った開発のハマリポイントを避けたい
matsu7874
0
1.3k
our test strategy on actix-web app
matsu7874
0
1.8k
Other Decks in Programming
See All in Programming
AI Augmentation Techniques with Liberty
ivargrimstad
1
570
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
690
The Cost of the DOM
ypresto
2
380
[DroidKnights 2026] Workflow AX 적용기 — 자동 정책 정리부터 E2E까지
dayeon
0
120
AIコーディング時代のKotest ユニットテストから APIレベルの仕様固定化テストへ
ooga04
0
340
将来の標準フォーマッター?ktfmtを深堀る
t45k
1
250
Kiro Crewによる開発体験ーKiro CrewでStrands Decider 2B に関する技術検証をやってみた
satoshi256kbyte
1
130
Crash Auto Pipelines
veronikapj
1
450
LLM 101
dalinaum
0
540
JavaScriptはシングルバイナリの夢を見るか / Does JavaScript Dream of a Single Binary?
ssssota
0
360
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
660
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
Featured
See All Featured
KATA
mclloyd
PRO
35
16k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Evolving SEO for Evolving Search Engines
ryanjones
0
370
Game over? The fight for quality and originality in the time of robots
wayneb77
1
340
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
560
Automating Front-end Workflow
addyosmani
1370
210k
Deep Space Network (abreviated)
tonyrice
0
430
Navigating Weather and Climate Data
rabernat
0
600
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Why Our Code Smells
bkeepers
PRO
340
58k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
580
Claude Code のすすめ
schroneko
67
230k