【正文】
) 。 } //(@@@@@@@@@@@) 。 for( int jx = 0 。 jx select_word[ ix ].length 。 ++jx ) { if( select_word[ ix ][ jx ].equals() ){ continue 。 } if( ( jx + 1 ) select_word[ ix ].length ){ ( or like 39。%) 。 } for( int i = jx + 1 。 i select_word[ ix ].length 。 ++i ) { if( !(select_word[ ix ][ i ].equals() ) ){ ( + select_word[ ix ][ i ] + % ) 。 } } if( ( jx + 1 ) select_word[ ix ].length ){ (39。 ) 。 } } //(@@@@@@@@@@@) 。 //( 2 is over ) 。 break 。 } } ( ) 。) 。 String str = () 。 return str 。 創(chuàng)建ResultBean類CreateResultCreateResult作用是創(chuàng)建ResultBean結果集。由于從接收關鍵字到真正創(chuàng)建ResultBean結果集,程序每次執(zhí)行的動作都相似,所以作者將這些動作進行封裝,使得代碼更加簡潔、更好維護。public ResultSet buildResult( String value ) { = value 。 () 。 ( ) 。 String[][] arraySelect = () 。 String selectSql = ( arraySelect , ) 。 = ( selectSql ) 。 return 。 } 結果集類ResultBeanResultBean封裝了ResultSet中大部分的接口,使得ResultSet能夠適應網(wǎng)頁顯示要求,例如:next()、destroy()等函數(shù),ResultBean的setPageNow()函數(shù)使得JSP頁面對分頁顯示的控制更簡單、代碼更優(yōu)雅。ResultBean的setPageNow()代碼public void setPageNow( int page_now ) { if( !( page_now 1 || page_now ) ) { = page_now 。 } else { if( page_now 1 ) { = 1 。 } else { = 。 } } try { () 。 int move_num = ( 1 ) * 。 ( move_num ) 。 }catch( SQLException e ){}}JSP調用代碼 ( pageInt )。 調用JSpider實現(xiàn)數(shù)據(jù)收錄JSpider兼容多種數(shù)據(jù)庫,,通過參數(shù)來調用相應的數(shù)據(jù)庫接口。 運行JSpeider。 JSpider遍歷、存儲過程信息存儲在數(shù)據(jù)庫中,、 詳細信息表 鏈接表 實現(xiàn)搜索頁面在瀏覽器中輸入相應的訪問地址,例如測試機瀏覽器中,輸入://localhost:8080/chen/,回車。 桌面瀏覽器搜索頁在輸入框里輸入關鍵字進行搜索。 桌面瀏覽器輸入點擊搜索一下,瀏覽器就會將關鍵字送到搜索頁,進行搜索處理。 桌面瀏覽器搜索結果顯示在Android瀏覽器的地址欄中輸入搜索頁的訪問地址,例如::8080/chen/,輸入搜索的關鍵字。 Android瀏覽器搜索結果顯示如果輸入的關鍵字在數(shù)據(jù)庫中不能查找到相關的信息,則ResultBean會返回一個空的集合。 查詢無結果顯示如果在輸入框輸入“新浪 汽車”,則在分詞處理時會分成:“新浪 汽車”、“新浪”、“汽車”、“新浪汽車”、“新浪%汽車”。 分詞搜索結 論本搜索引擎搜索的數(shù)據(jù)庫是主要是MYSQL,網(wǎng)站使用Tomcat作為開發(fā)環(huán)境,使用JSP語言和Java語言進行開發(fā),用本搜索引擎對其數(shù)據(jù)庫進行搜索,可以給用戶提供更加舒適的搜索體驗服務。本搜索算法能滿足中小型數(shù)據(jù)庫的深度搜索要求,測試通過各種關鍵字的搜索,優(yōu)勢是搜索精準度高、搜索界面簡潔以用、搜索效率高和搜索算法可移植性高,而且代碼思路清晰易懂,注釋明確簡潔。搜索引擎是用戶網(wǎng)上沖浪的一個關鍵軟體,在互聯(lián)網(wǎng)中查找自己想要的信息,最快捷、最方便、最有用的好幫手。本搜索引擎具有以下主要功能和特色:對關鍵詞進行分詞、截字;根據(jù)搜索的關鍵詞搜索數(shù)據(jù)庫;能識別關鍵詞中的有效詞或字;顯示搜索結果的標題和相關內容; 對搜索結果進行分頁。以上功能是站內搜索系統(tǒng)的核心功能。優(yōu)點:算法簡潔,注釋詳細簡單易懂;搜索精準度較高;搜索效率高;可移植性高;界面精美簡潔,用戶體驗優(yōu)秀;本次畢業(yè)設計基本完成了任務書中的各個要求,但由于本人的能力和知識范圍的局限,本設計仍有一些缺陷或者是可以優(yōu)化的地方,我也明白一個完善的設計不可能靠一時的開發(fā)來完成,需要通過不斷地測試和修改,其中測試包括開發(fā)者測試和第三方用戶測試,才可以完善一個系統(tǒng)。其實做畢業(yè)設計的過程也是一個學習的過程,在本次設計中,有許多技術和語言是我之前沒有接觸的,但是通過我自己的學習和老師的指導,還有同學的幫助,我最終還是克服了困難,突破了技術瓶頸,完成了系統(tǒng)的各個功能。致 謝光陰似箭,大學四年的生活一眨眼就過去了,在這四年里,我學習到了許多有用的知識和人生經驗,這些都是學校的老師和同學給予我的,全因為有各位老師和同學的存在,我的大學四年才過得那么精彩和有意義。在整個畢業(yè)設計的過程中,我的畢業(yè)設計指導老師穆欣侃老師給予了我耐心和正確的指導,他孜孜不倦地教誨使我能夠順利地完成畢業(yè)設計,和其他幫助過我的老師以及領導一樣,他們對學生的關懷教育和對學術的嚴謹執(zhí)著都使我十分感動,在此衷心感謝他們四年來對我的培養(yǎng)。最后我希望可以把我這四年所學的知識運用到實際中去,為社會做出貢獻,為幫助到更多的人而努力。參考文獻[1] 王希瑤. 淺析搜索引擎技術及技巧[J]電腦知識與技術, 2005,(21) . [2] 彭波,李曉明. 搜索引擎倒排文件的一種分塊組織技術[J]電子學報, 2005,(02) . [3] 黃強. 搜索引擎技術研究[J]計算機與現(xiàn)代化, 2004,(11) . [4] 林彤,江志軍. Internet的搜索引擎[J]計算機工程與應用, 2000,(05) . [5] 黃西安. 利用“百度”搜索網(wǎng)絡信息資源[J]科技情報開發(fā)與經濟, 2005,(04) . [6] 陳新明,鐘濤,萬鈞,吳杰,張世永. WWW搜索引擎的數(shù)據(jù)采集技術[J]計算機工程與應用, 2002,(07) . [7] 都云程,盧獻華. 中文搜索引擎現(xiàn)狀與展望[J]中文信息學報, 1999,(03) . [8] 丁承,邵志清. 基于字表的中文搜索引擎分詞系統(tǒng)的設計與實現(xiàn)[J]計算機工程, 2001,(02) . [9] 刁倩,張惠惠,王永成. Internet上的英文搜索引擎[J]計算機工程, 1999,(07) . [10] 陸興. 八個著名中文搜索引擎的特征及其評析[J]圖書館理論與實踐, 2003,(02) .[11]張俊林. 電子工業(yè)出版社. 《這就是搜索引擎——核心技術詳解》[12]劉奕群等. 清華大學出版社. 《搜索引擎技術基礎》附錄A 英語原文Analysis of J2EE WEB application constructionthe outline of the constructionJ2EE system includes many technologies such as java server pages (JSP), java SERVLET, enterprise bean, WEB service and so on. These technologies appeared have provided an extremely petitive choice to the development of WEB application of electronic merce . How these technologies are bined to form the stable construction which an adaptabl project needs is an importable step in the project development. Completing this step may form a main milestone baseline. It is a advantage to form this baseline.Many factors determine it order to form the construction baseline, the construction designer must choose the center technology in the platform and measure each kind of advantages. Often the construction designer has to check the massive technical datas in this process, listen to the suggestion of members in the ponent project, consider the domain expert39。s demand and consider the sponsor’s cost quota (including development cost and movement maintenance cost). Once the construction designer appraises, these factors will initially be localizated to the project playing the major role in the entire project process. Directional technology training: Once the construction of the construction designer is approved to form the baseline, the technology which the project development and the movement use has basically determined. Multitudinous project managers may worry about basic skills of the ponent members’ prepared in the need to be trained in the department providing to the technical sea which the construction designer faces on, project manager cannot propose the explicit technical training demand. It is impossible to carry on training to all technologies in the system ! Having the construction milestone baseline, project manager is able to determine what this project development could use any the time proposing the training demand should be most precise. But in the actual project development, technical training may be carried on before the baseline determined concurrently.Division of labor: Having a good construction blueprint, we can accurately divide the work such as homepage design, JSP label processing class design, SERVLET design, session bean design and many kinds of realizations. These all duties may