〔摘 要〕索引系統是搜索引擎的數據大本營,在搜索引擎發展早期,能夠索引的網頁數量代表了整個行業的技術發展水平。Lucene全文檢索技術是信息檢索領域廣泛使用的基本技術,它是一個優秀的開源全文本搜索技術框架,本文詳細分析了索引系統相關技術和Lucene的索引系統結構。
〔關鍵詞〕搜索引擎;索引;lucene;倒排索引
〔中圖分類號〕TP393.09 〔文獻標識碼〕A 〔文章編號〕1008-0821(2009)07-0169-03
The Design and Implementation of Indexing System Based on LuceneHuang Shaolin Wang Hua Zhang Yuhong Jiang Yifeng
(School of Information Engineering,Capital Normal University,Beijing 100037,China)
〔Abstract〕Index system is the data center of the search engine,at the beginning of the search engine,the number of the pages that can be indexed to represent the technology level of the whole industry.Lucene full-text retrieval,as a basic skill,is widely used in the field of information retrieval;it is an excellent open-source full-text search technology framework.The paper analyzed Lucene’s indexing system structure in detail and gave some introduction about the related technology of index system.
〔Key words〕search engine;index;lucene;inverted index
無論在工業界還是在學術界,搜索引擎一致地被認為分為下載、分析、索引和查詢四大系統,這四大系統相互配合共同實現搜索引擎的快、全、準、穩的四大需求。索引系統是搜索引擎最核心的模塊之一,索引過程就是將普通的文檔形式轉換為可快速檢索的索引形式。例如,書目包含的目錄。其中每一條目就是一個索引,用來標識某個章節的頁碼,幫助讀者快速瀏覽,索引就是這樣一個短小精煉的檢索信息的信息。
1 lucene及索引技術介紹
1.1 lucene介紹
Lucene是apache軟件基金會jakarta項目組的一個子項目,是一個開放源代碼的全文檢索引擎工具包,即它不是一個完整的全文檢索引擎,而是一個全文檢索引擎的架構,提供了完整的查詢引擎和索引引擎,它為數據訪問和管理提供了簡單的函數調用接口,可以方便的嵌入到各種應用中實現針對應用的全文索引/檢索功能。Lucene的API接口設計得比較通用,輸入輸出結構都很像數據庫的表、記錄和字段,所以很多傳統的應用的文件、數據庫等都可以比較方便的映射到Lucene的存儲結構或接口中。……