【正文】
y/paramname paramvaluefalse/paramvalue /initparam /servlet servlet servletnameshowPic/servletname servletclass/servletclass initparam paramnamecrossDomainSessionSecurity/paramname paramvaluefalse/paramvalue /initparam /servlet servletmapping servletnamedwrinvoker/servletname urlpattern/dwr/*/urlpattern /servletmapping ! 配置 DWR攔截器 end 在上述配置文件中定義了 Spring和 DWR的初始化類,除了 Spring的 ContextLoadListener和 DWR的Servlet外,在 showPic的 servlet,用于返回產(chǎn)品所對應(yīng)的圖片。 (二) ?xml version= encoding=UTF8? 20 !DOCTYPE dwr PUBLIC //GetAhead Limited//DTD Direct Web Remoting dwr allow create creator=spring javascript=searchService param name=beanName value=searchService / /create convert converter=bean match= /convert convert converter=bean match= /convert convert converter=bean match= /convert /allow /dwr 由于對 service 對象的調(diào)用是使用 DWR 在頁面中完成的。 DWR 能將前端頁面中的 js 與后臺服務(wù)器Java 程序進(jìn)行直接的映射轉(zhuǎn)換,因此需 要在 中進(jìn)行定義。在上述 代碼中為了使用 Spring中定義的各種 bean,使用了名為 spring 的對象 creator,它帶有名為 beanName 的參數(shù),其值應(yīng)該被指定為 文件中定義的 bean 的 ID 值,即本項(xiàng)目中的 SearchServiceImpl 類的實(shí)例。 前臺界面 21 圖 搜索引擎搜索頁面 圖 搜索不到用戶檢索的關(guān)鍵字時(shí)頁面 5 全文總結(jié) 本文介紹了使用 Lucene+Heritrix+Jsp+Servlet 構(gòu)建的圖書 搜索引擎。 Lucene作為一個(gè)開源的全完檢索引擎工具包,它不但是一個(gè)完整的全文檢索引擎,而且是一個(gè)全文檢索引擎的架構(gòu),提供了完整的查詢引擎和索引引擎。而 Heritrix是一個(gè)爬蟲框架,它是一個(gè)由 JAVA開發(fā)的、開源的 Web網(wǎng)絡(luò)爬蟲。所謂網(wǎng)絡(luò)爬蟲,顧名思義它可以方便快捷地從互聯(lián)網(wǎng)上爬取你所想要的相關(guān)信息 。 Lucene和 Heritrix 配合使用,Heritrix 爬取資源、 Lucene 建立索引并進(jìn)行檢索再加上 Jsp 的前臺界面,一個(gè)功能完善的圖書搜索引擎就誕生了。本項(xiàng)目可以幫助您更好更快地查找到您所需要的圖書信息。 6 致謝 在論文完成之際,我要特別感謝我的指導(dǎo)老師 耿煥同 老師的熱情關(guān)懷和悉心指導(dǎo)。在我撰寫論文的過程中,老師傾注了大量的心血和汗水,無論是在論文的選題、構(gòu)思和資料的收集方面,還是在論文的研究方法以及成文定稿方面,我都得到了 耿 老師悉心細(xì)致的教誨和無私的幫助,特別是他廣博的學(xué)識、深厚的學(xué)術(shù)素養(yǎng)、嚴(yán)謹(jǐn)?shù)闹螌W(xué)精神和一絲不茍的工作作風(fēng)使我終生受益,在此表示真誠地感謝和深深的謝意 。 在論文的寫作過程中,也得到了許多同學(xué)的寶貴建議,在此一并致以誠摯的謝意。感謝所有關(guān)心、支持、幫助過我的良師益友。 最后,向在百忙中抽出時(shí) 間對本文進(jìn)行評審并提出寶貴意見的各位專家表示衷心地感謝 。 22 參考文獻(xiàn) [1] 羅剛 .《自己動手寫搜索引擎》 . 電子工業(yè)出版社, 2020121. [2] 劉奕群 .《搜索引擎基礎(chǔ)技術(shù)》 . 清華大學(xué)出版社, 202071. [3] 邱哲,符滔滔 .《開發(fā)自己的搜索引擎 —— +Heritrix 第二版》人民郵電出版社 . 202011 [4] [美 ]格拉波內(nèi), [美 ]庫辛 著,趙利通 譯 .《搜索引擎優(yōu)化(第二版)》 清華大學(xué)出版社 , 2020111. [5] 吳眾欣,沈家立 .《 Lucene分析 與應(yīng)用》 . 機(jī)械工業(yè)出版社, 202091. [6] 袁津生,李群,蔡岳 .《搜索引擎原理與實(shí)踐》 . 北京郵電大學(xué)出版社, 2020. [7] 徐寶文,張衛(wèi)豐 .《搜索引擎與信息獲取技術(shù)》 . 清華大學(xué)出版社, 2020. [8]蔡棟 第二代搜索引擎模式探析 [期刊論文 ] 情報(bào)理論與實(shí)踐 2020(03) [9]周春 知識搜索引擎及教學(xué)應(yīng)用 [期刊論文 ] 中國教育技術(shù)裝備 2020(35) [10]李國成 網(wǎng)絡(luò)搜索引擎的現(xiàn)狀及發(fā)展探析 [期刊論文 ] 企業(yè)科技與發(fā)展 2020(8) [11]李村合 新一代中文智能搜索引擎尤里卡研究 [期刊論文 ] 情報(bào)科學(xué) 2020(1) [12]魏春生 .邊香玉 網(wǎng)絡(luò)搜索引擎 功能、使用技巧與檢索策略 [期刊論文 ] 吉林省經(jīng)濟(jì)管理干部學(xué)院學(xué)報(bào) 2020(4) [13]李村合 因特網(wǎng)多元搜索引擎 SearchX2020 的研究 [期刊論文 ] 情報(bào)學(xué)報(bào) 2020(4) [14] MA Hongwei. Discussion on the Technical Tactics and Developing Trends of Search Engine[J]. Sci/tech Information Development amp。 Economy. 202003 [15]YuShaoyun. How to search information resource by addresss earch[J]. Network Security Technology amp。 Application. 202011 [16] Wang Juanqin. Studies on Information Retrieval Model in Network Envirnment[J]. INFORMATION SCIENCE. 199903 [17]HAN Bin yun (Shanxi Electric Power Research Institute,Taiyuan,Shanxi 030001,China)。Discussion on Inter Information Retrieve[J]。Shanxi Electric Power。202005 [18] Du Aning Fang Binxing Hu Mingzeng Yun Xiaochun(National Key Lab on Computer Context Information Security,Harbin150001)。An Interactive Net Search Engine for Chinese Text and Its Selflearn ing Ability[J]。Computer Engineering and Applications。202010 [19] Zhang Chunying(Library of Handan Finance and Economics School, Handan, 056000)。The Effects and Strategies of Network Information Environmenton the Teaching of Document Searches[J]。Journal of Hebei Vacation Technical Teachers University(Social Sciences Edition Quarterly)。202002 [20]Diao Qian。 Zhang Huihui。 Wang Yongcheng (Institute of Image Processing amp。 Pattern Recognition, 23 Shanghai Jiaotong University。 Bac Zhaolong Library of ShanghaiJiaotong Universityl institUte of Computer Technology of Shanghai Jiaotong Universitys Shanghai 200。English Search Engine on Inter[J]。COMPUTER ENGINEERING。199907 [21] ZHANG WeiFeng。 XU BaoWen (Department of Computer Science and Engineering, Southeast University, Nanjing 210096)。RESEARCH ON FRAMEWORK SUPPORTING WEB SEARCH ENGINE[J]。JOURNAL OF COMPUTER RESEARCH AND DEVELOPMENT。202003 [22] ZHAO Xile,CHEN Guang(Collage of Computer and Information Technology,Henan Normal University,XinXiang 453007,China)。The Crawling System of Vertical Search Engine: Based on work spider technology[J]。Computer Knowledge and Technology。202019 24 Lucene Based Book Search Engines School of Computer and Software, Nanjing University of Information Science and Technology, Nanjing 210044 ABSTRACT Along with the rapid development of Inter, people not only use the Inter to see video, browse news and chat, the more the work as an tool to search the information. That is because the huge information on the Inter makes people get the information which we want without leaving home. Now we will design a book search engine base on Lucene + Heritrix. It firstly introduces this project related knowledge background, this paper expounds Heritrix then expounds Lucene and the database design, finally introduces how to make this system. The development tools of this system are MyEclipse and SQL Server2020. Key word: Lucene。 Heritrix。 search engines