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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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.7k
Marpを使って登壇資料を作る
matsu7874
0
2.5k
Generate a rust client code by OpenAPI Generator
matsu7874
0
840
ざっと理解するRust 2024 Edition
matsu7874
0
2k
プリントデバッグを失敗させないテクニック
matsu7874
1
520
社外を巻き込んだ勉強会を定期開催するコツ
matsu7874
0
260
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
Seven New Principles of Software Engineering
yegor256
0
480
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
170
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.5k
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
370
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
170
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
5.5k
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
250
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
小さなアプリを作って公開するまで
onozaty
0
170
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
230
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
210
GraphQL の onError と Nullability のこれから
quramy
0
210
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.7k
Navigating Weather and Climate Data
rabernat
0
590
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
590
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
610
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
430
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Are puppies a ranking factor?
jonoalderson
2
4.2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
610
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
300
How to Ace a Technical Interview
jacobian
280
24k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
980