摘要
提出了一个基于Java的全文搜索引擎设计方案,该方案包括基于HTMLParser设计的网络蜘蛛、基于Lucene设计的索引器和检索器3部分。网络蜘蛛采用标签爬行策略和宽度优先遍历算法,实现了对网页的遍历;索引器对网络蜘蛛抓取到的网页创建索引,建立了索引数据库;检索器根据用户输入的关键词对索引数据库进行检索并将检索结果反馈给用户。检索实验证明,该搜索引擎是一个比较高效的检索工具。
This paper proposes a full-text search engine design scheme based on Java.The scheme includes three parts:A web spider based on HTML Parser,an indexer and a searcher based on Lucene.The web spider uses tag crawling strategy and breadth-first traversal algorithm,realizes the traversal of web pages; the indexer create index for the page which is scraped by the web spider to build the index database; the searchers search on the index database according to the keyword entered by the user and return the search results back to the user.Retrieval experiments show that the search engine is a more efficient retrieval tools.
出处
《微型电脑应用》
2014年第4期22-24,共3页
Microcomputer Applications