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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Brian Hsu
January 17, 2013
Programming
190
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
90
Java Unicode NCR 處理
brianhsu
1
430
如何在 Java App 中導入 Scala @ JavaTWO 2011
brianhsu
1
130
[LT] 自由軟體讓你五分鐘上新聞 @ OSDC.tw 2011
brianhsu
1
100
ScalaTest-連貓都會的單元測試與 BDD @ COSCUP 2010
brianhsu
0
290
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
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
440
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
190
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
570
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
340
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
120
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
730
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
7
1.2k
The NotImplementedError Problem in Ruby
koic
1
1.1k
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
140
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
1k
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
Color Theory Basics | Prateek | Gurzu
gurzu
0
380
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
330
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
620
The SEO Collaboration Effect
kristinabergwall1
1
500
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
How to Ace a Technical Interview
jacobian
281
24k
First, design no harm
axbom
PRO
2
1.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
250
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/