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
數位典藏聯合目錄搜尋引擎模組
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Brian Hsu
January 17, 2013
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
數位典藏聯合目錄搜尋引擎模組
Brian Hsu
January 17, 2013
More Decks by Brian Hsu
See All by Brian Hsu
我如何停止憂慮並愛上 Non-MVC Web Framework @ OSDC.tw 2013
brianhsu
6
3.3k
Java XML Processing
brianhsu
0
91
Java Unicode NCR 處理
brianhsu
1
430
如何在 Java App 中導入 Scala @ JavaTWO 2011
brianhsu
1
130
[LT] 自由軟體讓你五分鐘上新聞 @ OSDC.tw 2011
brianhsu
1
110
ScalaTest-連貓都會的單元測試與 BDD @ COSCUP 2010
brianhsu
0
300
Introduction to Scala @ TWJUG 2010/07
brianhsu
1
200
Programming Android Application in Scala @ OSDC.tw 2010
brianhsu
1
130
Other Decks in Programming
See All in Programming
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2k
React本体のコードリーディング
high_g_engineer
1
150
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
500
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
170
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
750
SlackアプリとLambdaの 連携を構築した話
pawn_4_s
1
130
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
140
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
250
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
120
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
170
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
1
210
30年振りにコンパイラの定数整数除算を改善した
herumi
3
540
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Building an army of robots
kneath
306
46k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
260
Building Adaptive Systems
keathley
44
3.2k
Why Our Code Smells
bkeepers
PRO
340
58k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
For a Future-Friendly Web
brad_frost
183
10k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Skip the Path - Find Your Career Trail
mkilby
1
190
Design in an AI World
tapps
1
280
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Transcript
Lucene 搜尋引擎 BrianHsu
[email protected]
Lucene 簡介 • 全文搜尋引擎 – http://lucene.apache.org/ – http://lucene.apache.org/core/3_6_2/gettingstarted.html • 聯合目錄目前使用
3.5 版
Lucene 索引檔 • Lucene 索引檔 – 一整個資料夾 • Lucene Document
– 一份索引檔裡有 0~N 個 Lucene Document • Lucene 欄位 – 每一份 Lucene Document 有 0~N 個 Lucene 欄位 – key1=[value1, value2, value3] – key2=[value1, value2, value3] • 觀察索引檔工具 – http://code.google.com/p/luke/
聯合目錄索引檔 • //140.109.18.152/LuceneIndex – 藏品索引檔 – 五百萬筆的藏品全文搜尋 • //140.109.18.152/CatalogIndex –
分類目錄的索引檔 – 聯合目錄搜尋裡的「符合的分類名稱」
搜尋引擎模組 • 將 Lucene 包裝成聯合目錄專用 • SearchEngine – 核心搜尋功能 •
ArchiveSearch – 聯合目錄搜尋 • AATSearch – 台灣書院搜尋 • ShopSearch – 授權加值平台搜尋
演算法流程 1. 使用者先建立 SearchEngine 的物件,並傳入 Sort 物件指定排序 的方式 2. 使用者呼叫
SearchEngine 中的 search 方法 3. SearchEngine 將使用者傳入的 search 要求轉遞給 Lucene ,並 取得搜尋結果。 4. 針對搜尋的結果數量建立相對應的 SearchResult<T> 物件 5. 透過 SearchResultConverter 將 Lucene 的搜尋結果的每一筆資 料轉成 T 類別,並且放入 SearchResult<T> 容器當中。 6. 利用 Sort 物件排序 SearchResult<T> 物件 7. 返回 SearchResult<T> 物件給使用者
使用方式 • 參照 – ArchiveSearch/src/main/java/example/Test.java – LuceneSearch/javadoc/