Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
15分で検索エンジニアになる
Search
Natsu Ozawa
August 22, 2021
Programming
0
250
15分で検索エンジニアになる
SGG x Zli合同LTの資料です
Natsu Ozawa
August 22, 2021
Tweet
Share
More Decks by Natsu Ozawa
See All by Natsu Ozawa
0の0乗
natsuozawa
0
45
圏論はどこが面白いの?
natsuozawa
0
68
Other Decks in Programming
See All in Programming
HUIT新歓2024「競技プログラミング、やってみませんか?」
slephy2784
1
260
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
930
Ruby GitHub Packages
bkuhlmann
0
630
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
250
코틀린으로 멀티플랫폼 만들기
pangmoo
0
140
Ruby Function Composition
bkuhlmann
1
330
Semantic search with Django and pgvector
pauloxnet
0
240
Front-end application development, Symfony-style(s)
dunglas
2
2k
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
新宿ダンジョンを可視化してみた
satoshi7190
2
220
データアナリストが行うDatabricksを活用したETLの自動化事例
shinoa
0
260
Snowflakeで眠ったデータを起こそう!
estie
0
110
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.4k
Build your cross-platform service in a week with App Engine
jlugia
225
17k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
13
1.5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Code Review Best Practice
trishagee
54
15k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
320
23k
Reflections from 52 weeks, 52 projects
jeffersonlam
344
19k
Navigating Team Friction
lara
177
13k
Automating Front-end Workflow
addyosmani
1355
200k
What's in a price? How to price your products and services
michaelherold
237
11k
Scaling GitHub
holman
457
140k
Transcript
15分で検索エンジニアになる @natsuozawa
自己紹介 • Computer Science @ エジンバラ大学 (UK) • クックパッドでインターン(6~8月) •
レシピアプリの検索機能の改善を担当 • LT超初心者
今日のゴール 検索エンジニア入門
前提 • Elasticsearchなどの詳細なAPIに入る 時間はない • 検索知識ゼロからイチを目指す • Relevant Searchという本をもとにし ている
• 詳しくは後でQiitaに書く
検索とは 1. コンテンツを選択し、ランク付けする • アルゴリズム問題 2.プラットフォームとして市場価値を生み出す • ビジネス問題 3. ユーザーの属性などのcontextを考慮する
• 総合的な問題
検索の仕組み(たとえ) 検索は、本の後ろにある「索引」をイメージすると分かりやすい
検索の仕組み 1. 定期的に、全てのコンテンツの転置インデックスを作る 2. 検索時、関連するドキュメント(コンテンツ)を表示する 3. ユーザーは気になるコンテンツをクリックする
転置インデックス構築(具体例)
転置インデックス構築(具体例)
転置インデックス構築(具体例)
用語説明
クエリから検索結果まで keyword token signal score results analysis signal modelling scoring
function
アナライザ ドキュメントから検索用のトークンを作成する 意味 (data) 意図 (user) シグナル
アナライザ(例) standard tokenizer standard filter lowercase filter stop filter standard
analyzer “The quick brown fox.” [“The”, “quick”, “brown”, “fox”] [“the”, “quick”, “brown”, “fox”] [“quick”, “brown”, “fox”]
トークンにできるもの(例) • 日本語の文章(形態素解析) • 類義語(類義語辞書、ヒエラルキー) • 位置情報 • 電話番号 •
音楽のメロディー
シグナルモデリング 基本:Tf-idfで合致度を数値化
シグナルモデリング • データソースのフィールドはアプリケーション用に最適化 • 検索用に最適化する必要がある • 複数フィールド x 複数キーワードのロジック •
Field centric search • Term centric search
Field-centric search stardust crusaders stardust crusaders タイトル (tf-idf) 説明文 (tf-idf)
function Score: 0.1143
Field-centric searchの問題点 • Albino elephant problem • 高いスコアを出すのに、全ての検索キーワードがマッチする必要はな い •
Signal discordance problem • ユーザーのイメージと検索に使われるフィールドが異なる • ユーザーはあまりフィールドのことを考えていない
Term-centric search stardust stardust crusaders crusaders タイトル (tf-idf) 説明文 (tf-idf)
タイトル (tf-idf) 説明文 (tf-idf) function function function Score: 0.1143
Custom all fields stardust crusaders title & subtitle (tf-idf) title
& subtitle (tf-idf) function Score: 0.1143
Cross fields stardust stardust crusaders crusaders title subtitle title subtitle
function function function Score: 0.1143 tf-idf tf-idf
Ranking関数 • Sum, max, weighted sumなど • 条件付きブースト • 条件つきフィルター
• 独自の関数を定義 • 例:Decay function Relevant Search figure 7.11
ありがとうございました