View
8.811
Download
2
Category
Preview:
Citation preview
15/11/02
Lucene/Solr Revolution2015 参加レポート
ヤフー株式会社 宋賢佑
2015/10/28 第17回 Lucene/Solr勉強会 #SolrJP
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P2 自己紹介
• 宋 賢佑 (ソン ヒョンウ)
• ヤフー株式会社
• 担当業務内容
– ヤフー社内サービス向け検索プラットフォームの開発
– ヤフーの各種サービスへのSolr導入のお手伝い
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P3 Agenda
• Lucene/Solr Revolution2015 紹介
• 注目セッションの紹介
• 今後のSolr
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P4 Lucene/Solr Revolution 2015
• Lucene/Solr分野の最大カンファレンス
• Lucene/Solrコミッターおよびエキスパートが多数参加
• トレーニングとセッション
• スポンサー
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P5 Lucene/Solr Revolution 2015
• 今年はAustin, TX
• 10/13-16
• Austinヒルトンホテルで開催
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P6 注目セッションの一つ
• Learning to Rank in Solr
– Bloombergについて
• Michael Nilsson, Diego Ceccarelli
– Bloombergニュース検索の課題
• Machine learningの必要性
– Learning to Rankの説明
– Learning to Rank in Solrの説明
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P7 Bloombergについて
• Bloomberg ニュース – 1日に800万のサーチ
– Index上に4億の記事
• Solrを選択した理由 – 大規模なコミュニティーと世界各地のコミッター
– Open Source Apache Projectであるため
– たくさんの実績
– 成長性
• コントリビュート
– バグ修正
– Solr4.5.0からほぼ毎回コントリビュート
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P8 Bloomberg ニュース検索の課題
• 課題
– 検索クエリに対して適合率がより高い結果を返す
– 検索クエリによって適合率が高いドキュメントは異なる
• クエリ(austin)のランキング順位: doc3, doc1, doc2
• クエリ(bloomberg)ランキング順位: doc2, doc1, doc3
– 手動チューニングはコストが高い
• 2000+ パラメーター(フィールド)
• 8000+ クエリに対する定期的なチューニング
– ドキュメントの更新
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P9 Learning to Rankについて (1)
• Search パイプライン
商品
ニュース
人々
その他
User Query
Index
Top-‐x retrieval
Solr
Training Data
Learning Algorithm
Offline Ranking Model
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P10 Learning to Rankについて (2)
• Search パイプライン
商品
ニュース
人々
その他
User Query
Index
Top-‐x (1000) retrieval
Solr
Top-‐k (10) reranked
Ranking Model
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P11 Learning to Rankについて (3)
• Search パイプライン : Solr Integration
商品
ニュース
人々
その他
User Query
Index
Top-‐x (1000) retrieval
Top-‐k (10) reranked
Ranking Model
Solr
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P12 Learning to Rankについて (4)
• Training パイプライン(Offline)
商品
ニュース
人々
その他
Training Query-‐
Document Pairs
Index
Feature Extrac5on
Learning Algorithm
Ranking Model Metrics
Explicit data
Implicit data
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P13 Learning to Rankについて (5)
• Features
– データのインスタンスの測定可能な属性(アトリビュート)
– 数値化された特徴データ
• Feature Extraction
– 機械学習 特徴抽出
– データを端的に表現できるような特徴を見つけ出すための処理
– Feature Extractor • ドキュメントのIndexing時に既に決まるFeatureもあれば
• クエリで決まる属性もある
• クエリとドキュメントの関連から決まるFeatureもある
• 効果的な Feature をデザインするには、一般に知識と経験が必要
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P14 Learning to Rankについて (6)
• Featuresの例 – 「APPL US」というクエリ結果の例
• Featuresの例 (数値化された特徴データ)
– Was the result a cofounder? à 0
– Does the document have an exec. position? -> 1
– Does the query match the document title -> 0
– Popularity -> 0.9
• https://en.wikipedia.org/wiki/Tim_Cook
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P15 Learning to Rankについて (7)
• その他Featuresの例
– if the query matches the title
– length of the document
– number of views
– how old is it?
– can be visualized on a mobile device?
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P16 Learning to Rankについて (8)
• Metrics (メトリクス)
– Ranking Modelに対する測定方法
• Offline Metrics (静的)
– Precision(適合率)/Recall(再現率)/F-Score
– nDCG
– その他
• Online Metrics
– CTR
– Time to first click
– 滞留時間
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P17 Learning to Rankについて (9)
• Learning to Rank
– Metricsを最適化するためのFeaturesの組み合わせを学習する。
– Learning Algorithm
• RankSVM
• LambdaMART
• など
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P18 Learning to Rank in Solr (1): 前に紹介
• Search パイプライン : Solr Integration
商品
ニュース
人々
その他
User Query
Index
Top-‐x (1000) retrieval
Top-‐k (10) reranked
Ranking Model
Solr
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P19 Learning to Rank in Solr (2)
• LTR プラグイン
商品
ニュース
人々
その他
User Query
Index
Top-‐x(1000件) retrieval
Ranking Model
Top-‐k(10件) reranked
Solr Query
Matches [10k]
Score [10k]
LTR Query
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P20 Learning to Rank in Solr (3)
• Learning to Rank in Solr(LTR plugin)のゴール
– 手動でのチューニングをしない
• Machine learning使用
– リレバンシーの改善
– レイテンシ維持
• 既にあるSolr機能を使用
• データ転送量の軽減
– 使い易さ:Feature作成を容易
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P21 Learning to Rank in Solr (4)
• LTR プラグイン
– LTRQueryはSolrのRankQuery機能を拡張
• solrconfig.xml
• SolrのRerankリクエストのパラメーターを使用
rq={!ltr model=myModel1 reRankDocs=100 efi.user_query=‘james’ efi.my_var=123}
<queryParser name=“ltr” class=“org.apache.solr.ltr.ranking.LTRQParserPlugin”
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P22 Learning to Rank in Solr (5)
• Search パイプライン(Online)
商品
ニュース
人々
その他
User Query
Index
Top-‐x(1000件) retrieval
Ranking Model
Top-‐k(10件) reranked
Matches [10k]
Score [10k]
Feature Extrac5on
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P23 Learning to Rank in Solr (6)
• Feature Extraction
– SolrのTransformerFactoryを使用
– 各ドキュメントにカスタムフィールドを返す
• fl = *,[fv]
{ “name”:”Tim Cook”, “primary_position”: “ceo”, “category” : “person”, … “[fv]”:”isCofounder:0.0, isPersonAndExecutive:1.0,matchedTitle:0.0, popularity:0.9” }
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P24 Learning to Rank in Solr (7)
• Featuresの例 – 「APPL US」というクエリ結果の例
• Featuresの例 (数値化された特徴データ)
– Was the result a cofounder? à 0
– Does the document have an exec. position? -> 1
– Does the query match the document title -> 0
– Popularity -> 0.9
• https://en.wikipedia.org/wiki/Tim_Cook
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P25 Learning to Rank in Solr (8)
• Modelの例 { “type”: “org.apache.solr.ltr.ranking.LambdaMARTModel”, “name”:”myModel1”, “features”:[ {“name”: “matchedTitle”}, {“name”: “isPersonAndExecu5ve”} }, “params”: {
“trees”: [ { “weight”:1, “tree”:{ “feature”:”matchedTitle”, “threshold”:0.5, “led”: {“value”:-‐100}, “right”:{ “feature”:”isPersonAndExecu5ve”, “threshold”:0.5, “led”:{“value”:50}, “right”:{“value”:75} } }
] } }
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P26 Learning to Rank in Solr (9)
• Modelの例
matchedTitle
isPersonAndExecutiveValue: -100
Value: 50 Value: 75
Threshold:0.5
Threshold:0.5
{ “name”:”Tim Cook”, “primary_position”: “ceo”, “category” : “person”, … “[fv]”:”isCofounder:0.0, isPersonAndExecutive:1.0,matchedTitle:0.0, popularity:0.9” }
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P27 Learning to Rank in Solr (10)
• Feature & Model
– Solr Managed Resourceに登録
– FeatureStore
• Featureデプロイ
• curl –XPUT ‘http://yoursolrserver/solr/collection/config/fstore’ –data-binary @./features.json –H ‘Content-type:application/json’
– ModelStore
• Modelデプロイ
• curl –XPUT ‘http://yoursolrserver/solr/collection/config/mstore’ –data-binary @./model.json –H ‘Content-type:application/json’
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P28 Learning to Rank in Solr (11)
• LTR 評価 – Offline Metrics
• nDCG 10% 向上
– Online Metrics
• Clicks @ 1 up 10%– Performance
• 条件
– 1000万ドキュメント
– 10万クエリ
– 1k Features
– 1k ドキュメント/クエリ がrerankされる
• 結果
– 30%処理時間の向上 (以前のランキングシステムより)
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P29 Learning to Rank in Solr (12)
• LTR プラグイン利点 – コンパイルをせずにFeatureエンジ二アリングが可能
– FeatureExtractionにSolrの豊富なサーチ機能を使用
– リレバンシー改善
– リレバンシーチューニングの自動化
– パフォーマンス改善
• 今後
– LTR プラグインのOpenSource化
– ReRankingモデルのマルチ対応
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P30 Learning to Rank in Solr (13)
• 公開スライド:http://www.slideshare.net/lucidworks/learning-to-rank-in-solr-presented-by-michael-nilsson-diego-ceccarelli-bloomberg-lp
• LTRプラグインのOSS公開予定(近日中)
• 他のセッションと同様に動画もアップロードされる予定
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P31 その他
• その他のセッションについて – Solr & Spark for Real-Time Big Data Analytics – Timothy Potter – Solr Distributed Indexing in WalmartLabs – Shengua Wan (Walmart) – Building Smarter Search Apps using built-in Knowledge Graphs and Query Introspection – Ted
Sullivan (Lucidworks) – “Distributed Search in Riak: Integrating search in a NoSQL database” – Fred Dushin (Basho) – How to Build a Smart Search Engine with Intent Detection – Rama Yannam, Viju
Kothuvatiparambil (Bank of America)
– Leveraging Lucene/Solr as a Knowledge Graph and Intent Engine: Presented by Trey Grainger(CareerBuilder.com)
– “When you have to be relevant” – Tom Burgmans – Building a real-time news search engine – Ramkumar Aiyengar (Bloomberg) – Implementing Conceptional Search in Solr using LSA and Word2Vec – Simon Hughes (Dice.com) – Real-time Analytics with Solr – Yonik Seeley(Cloudera) – Understandin the Solr Security Framework – Anshum Gupta(IBM Watson)
– Faceting optimization for Solr – Toke Eskildsen (State and University Library, Denmark)
• http://www.slideshare.net/lucidworks?mkt_tok=3RkMMJWWfF9wsRohu6rKZKXonjHpfsX67%2B0sWKG3lMI%2F0ER3fOvrPUfGjI4ESMRkI%2BSLDwEYGJlv6SgFT7fMMapt1rgEWRY%3D
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P32 その他
• Solrの今後(In the next 2 Years) – Big Changes
• Lucene/Solr Committerが今後2年で期待する大きな変化
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P33 その他
• Solrの今後(In the next 2 Years) – Big Changes
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P34 その他
• Solrの今後(In the next 2 Years) – Deployment1 & Deployment2
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P35 その他
• Solrの今後(In the next 2 Years)– Deployment1
• Rack awareness(Grant)• More Instance roles (Ram)• “Smart” cluster management based on size, load & machine health (Hoss)
• Intelligence with elasticity (Ram)• Streamlined metrics support (Ram)
– Deployment2• Scalability (Noble, Anshum, Grant)• Robust multi-tenancy (Shalin)• Multi-DataCenter (Hoss, Shalin)• Shipped base bones with utilities to install 3rd party plugin(Erik)• SolrCloud becoming the only way to run Solr (Varun)
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P36 参考文献
• http://postd.cc/data-learning-and-modeling/• http://enterprisezine.jp/article/detail/6471• https://en.wikipedia.org/wiki/Learning_to_rank• http://www.slideshare.net/lawmn/learning-to-rankforir
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
P37 おわり
ご静聴ありがとうございました。
Copyright (C) 2015 Yahoo Japan Corpora5on. All Rights Reserved. 無断引用・転載禁止
Recommended