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
500
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
More Decks by Kentaro Matsumoto
See All by Kentaro Matsumoto
AIで仕事のやり方を変える
matsu7874
3
1.1k
claude_code.pdf
matsu7874
5
7.7k
Marpを使って登壇資料を作る
matsu7874
0
2.4k
Generate a rust client code by OpenAPI Generator
matsu7874
0
800
ざっと理解するRust 2024 Edition
matsu7874
0
1.9k
プリントデバッグを失敗させないテクニック
matsu7874
1
500
社外を巻き込んだ勉強会を定期開催するコツ
matsu7874
0
250
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
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
540
AHC070解法紹介
eijirou
0
110
Family mrubyの進捗
kishima
1
120
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
180
What We Talk About When We Talk About XP
m_seki
2
610
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
230
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
180
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
540
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
810
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
150
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
250
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
The Art of Programming - Codeland 2020
erikaheidi
57
14k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
The Spectacular Lies of Maps
axbom
PRO
1
990
Git: the NoSQL Database
bkeepers
PRO
432
67k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
380
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Transcript
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
実装が見やすい • 読むべし