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
150
數位典藏聯合目錄搜尋引擎模組
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
75
Java Unicode NCR 處理
brianhsu
1
380
如何在 Java App 中導入 Scala @ JavaTWO 2011
brianhsu
1
100
[LT] 自由軟體讓你五分鐘上新聞 @ OSDC.tw 2011
brianhsu
1
88
ScalaTest-連貓都會的單元測試與 BDD @ COSCUP 2010
brianhsu
0
250
Introduction to Scala @ TWJUG 2010/07
brianhsu
1
180
Programming Android Application in Scala @ OSDC.tw 2010
brianhsu
1
100
Other Decks in Programming
See All in Programming
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
140
Passkeys for Java Developers
ynojima
3
870
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
840
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
320
無関心の谷
kanayannet
0
180
DroidKnights 2025 - 다양한 스크롤 뷰에서의 영상 재생
gaeun5744
3
300
データベースコネクションプール(DBCP)の変遷と理解
fujikawa8
1
270
Select API from Kotlin Coroutine
jmatsu
1
180
Java on Azure で LangGraph!
kohei3110
0
160
Datadog RUM 本番導入までの道
shinter61
1
310
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
300
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
290
Featured
See All Featured
Docker and Python
trallard
44
3.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
660
Facilitating Awesome Meetings
lara
54
6.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
How STYLIGHT went responsive
nonsquared
100
5.6k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
A designer walks into a library…
pauljervisheath
206
24k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Building a Modern Day E-commerce SEO Strategy
aleyda
41
7.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
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/