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
Brian Hsu
January 17, 2013
Programming
0
160
數位典藏聯合目錄搜尋引擎模組
Brian Hsu
January 17, 2013
Tweet
Share
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
82
Java Unicode NCR 處理
brianhsu
1
410
如何在 Java App 中導入 Scala @ JavaTWO 2011
brianhsu
1
120
[LT] 自由軟體讓你五分鐘上新聞 @ OSDC.tw 2011
brianhsu
1
98
ScalaTest-連貓都會的單元測試與 BDD @ COSCUP 2010
brianhsu
0
280
Introduction to Scala @ TWJUG 2010/07
brianhsu
1
190
Programming Android Application in Scala @ OSDC.tw 2010
brianhsu
1
120
Other Decks in Programming
See All in Programming
Implementation Patterns
denyspoltorak
0
150
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.6k
.NET Conf 2025 の興味のあるセッ ションを復習した / dotnet conf 2025 quick recap for backend engineer
tomohisa
0
110
AgentCoreとHuman in the Loop
har1101
3
110
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
170
Grafana:建立系統全知視角的捷徑
blueswen
0
280
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
230
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2.1k
CSC307 Lecture 04
javiergs
PRO
0
630
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
5.2k
CSC307 Lecture 01
javiergs
PRO
0
670
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
460
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Into the Great Unknown - MozCon
thekraken
40
2.2k
We Are The Robots
honzajavorek
0
130
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
190
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
690
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Are puppies a ranking factor?
jonoalderson
0
2.6k
First, design no harm
axbom
PRO
2
1.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.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/