【正文】
大 連 民 族 學(xué) 院 本 科 畢 業(yè) 設(shè) 計(jì)(論 文) 基于 Lucene 與 Heritrix 的搜索引擎構(gòu)建 學(xué) 院(系): 計(jì)算機(jī)科學(xué)與工程 專(zhuān) 業(yè): 軟件工程 學(xué) 生 姓 名: 馮超 學(xué) 號(hào): 04083105 指 導(dǎo) 教 師: 趙晶瑩 評(píng) 閱 教 師: 完 成 日 期 : 大連 民族學(xué)院 基于 Lucene 與 Heritrix 的搜索引擎構(gòu)建 I 摘 要 在互聯(lián)網(wǎng)蓬勃發(fā)展的今天 , 互聯(lián)網(wǎng)上的信息更是浩如煙 海 。人們?cè)谙硎芑?聯(lián) 網(wǎng)帶來(lái)的便利的同時(shí) , 卻面臨著一個(gè)如何在如此海量的內(nèi)容中準(zhǔn)確、快捷地找到自己所需要的信息的問(wèn)題 , 由此互聯(lián)網(wǎng)搜索引擎應(yīng)運(yùn)而生 。 本文 在對(duì)搜索引擎的原理、組成、數(shù)據(jù)結(jié)構(gòu) 和 工作流程等方面 深入研究 的基礎(chǔ)上,對(duì)搜索引擎的三個(gè)核心部分即網(wǎng)絡(luò)蜘蛛、網(wǎng)頁(yè)索引 和 搜索 的 分析 及 實(shí)現(xiàn) 過(guò)程 進(jìn)行闡述 。網(wǎng)絡(luò)蜘蛛部分采用了 基于遞歸和 歸檔 機(jī)制的 Heritrix 網(wǎng)絡(luò)爬蟲(chóng) ; 網(wǎng)頁(yè)索引部分利用開(kāi)源的 Lucene 引擎架構(gòu)設(shè)計(jì)并實(shí)現(xiàn)了一個(gè)可復(fù)用 的 、可擴(kuò)展的 索引建立 與 管理子 系統(tǒng) ; 搜索部分在 Ajax 技術(shù) 支持 上,設(shè)計(jì)并實(shí)現(xiàn)了一個(gè)靈活、簡(jiǎn)潔的 用戶(hù)接口。 本系統(tǒng)具有抓取網(wǎng)頁(yè)、建立和管理索引、建立日志以及搜索信息等功能,具備一定的應(yīng)用前景。 關(guān)鍵詞: 搜索引擎; 中文 分詞 ;索引 基于 Lucene 與 Heritrix 的搜索引擎構(gòu)建 II The Construction of Search Engine Based on Lucene and Heritrix Abstract The contents on the Web are increasing exponentially as the rapid development of the Inter. A problem how to obtain the useful information from vast contents quickly and accurately is facing us while people are enjoying the convenience of the Inter. The solver of this problem is Web Search Engine. The analysis and implementation process of three basic ponents of search engine(Crawler, Indexer and Searcher) is described in this paper on the basis of further study on the principles, position, data structure and work flow of search engine. The crawler ponent is implemented with Heritrix crawler based on the mechanism of recursion and archiving。 A reusable, extensible index establishment and management subsystem are designed and implemented by opensource package named “Lucene” in the indexer ponent。 The Searcher ponent based on the Ajax technology is designed and realized as a flexible, concise user interface. The system has some functions, such as crawling web page, establishment and management index, establishment log and search information, it has a certain application prospect. Key Words: Search Engine; Chinese Word Segmentation; Index 基于 Lucene 與 Heritrix 的搜索引擎構(gòu)建 III 目 錄 摘 要 ..................................................................................................................................... I Abstract ...................................................................................................................................... II 1 緒論 ........................................................................................................................................ 1 項(xiàng)目背景 ..................................................................................................................... 1 國(guó)內(nèi)外發(fā)展現(xiàn)狀 ......................................................................................................... 1 2 系統(tǒng)的開(kāi)發(fā)平臺(tái)及相關(guān)技術(shù) ................................................................................................ 3 系統(tǒng)開(kāi)發(fā)平臺(tái) ............................................................................................................. 3 系統(tǒng)開(kāi)發(fā)技術(shù) ............................................................................................................. 3 Heritrix 網(wǎng)絡(luò)爬蟲(chóng)簡(jiǎn)介 ..................................................................................... 3 Lucene 技術(shù)簡(jiǎn)介 .............................................................................................. 4 Ajax 技術(shù)簡(jiǎn)介 .................................................................................................. 4 3 系統(tǒng)分析與設(shè)計(jì) .................................................................................................................... 6 系統(tǒng)需求分析 ............................................................................................................. 6 系統(tǒng)架構(gòu)分析 .................................................................................................. 6 系統(tǒng)用例模型 .................................................................................................. 6 系統(tǒng)領(lǐng)域模型 ................................................................................................ 10 系統(tǒng)概要設(shè)計(jì) ........................................................................................................... 11 系統(tǒng)詳細(xì)設(shè)計(jì) ........................................................................................................... 12 索引建立子系統(tǒng) ............................................................................................ 13 用戶(hù)接口子系統(tǒng) ............................................................................................ 17 4 系統(tǒng)的實(shí)現(xiàn) .......................................................................................................................... 18 系統(tǒng)包框架的構(gòu)建 ................................................................................................... 18 索引建立子系統(tǒng) ............................................................................................ 18 用戶(hù)接口子系統(tǒng) ............................................................................................ 19 系統(tǒng)主要功能實(shí)現(xiàn) ................................................................................................... 19 索引建立子系統(tǒng) ............................................................................................ 19 用戶(hù)接口子系統(tǒng) ............................................................................................ 22 結(jié) 論 .................................................................................................................................. 24 參 考 文 獻(xiàn) ............................................................................................................................ 25 致 謝