摘 要
网络中的资源非常丰富,但是如何有效的
搜索信息却是一件困难的事情。建立搜索引擎就是解决这个
问题的最好方法。本文首先详细介绍了基于英特网的搜索引擎的
系统结构,然后从网络机器人、索引引擎、Web服务器三个方面进行详细的说明。为了更加深刻的理解这种技术,本人还亲自实现了一个自己的搜索引擎--新闻搜索引擎。
新闻搜索引擎是从指定的Web页面中按照超连接进行解析、搜索,并把搜索到的每条新闻进行索引后加入数据库。然后通过Web服务器接受客户端请求后从索引数据库中搜索出所匹配的新闻。
本人在介绍搜索引擎的章节中除了详细的阐述技术核心外还结合了新闻搜索引擎的实现代码来说明,图文并茂、易于理解。
关键词:搜索引擎;网络蜘蛛;搜索策略
Abstract
The resources in the internet are abundant, but it is a difficult job to search some useful information. So a search engine is the best method to solve this problem. This article fist introduces the system structure of search engine based on the internet in detail, then gives a minute explanation form Spider search, engine and
web server. In order to understand the technology more deeply, I have programmed a news search engine by myself.
The news search engine is explained and searched according to hyperlink from a appointed web page, then indexes every searched information and adds it to the index database. Then after receiving the customers' requests from the web server, it soon searches the right news form the index engine,
In the chapter of introducing search engine, it is not only elaborate the core technology, but also combine with the modern code, pictures included, easy to understand.
Key Words:Search engine;Web spider;Search strategy
目 录
摘 要 I
Abstract II
引 言 1
1 搜索引擎的结构 2
1.1搜索引擎系统概述 2
1.2搜索引擎的构成 2
1.2.1网络蜘蛛 2
1.2.2索引与搜索 2
1.2.3 Web服务器 3
1.3搜索引擎的主要指标及分析 3
2 网络机器人 4
2.1什么是网络机器人 4
2.2网络机器人的结构分析 4
2.2.2 Spider
程序结构 4
2.2.3如何构造Spider程序 5
2.2.4如何提高程序性能 7
2.2.5网络机器人的代码分析 7
3 基于lucene的索引与搜索、tomcat 服务器 10
3.1什么是LUCENE全文检索 10
3.2 LUCENE的原理分析 10
3.2.1客户端
设计 10
3.2.2全文检索的实现机制 11
3.2.3 Lucene的索引效率 11
3.2.4 中文切分词机制 13
3.2.5服务端设计 14
3.3 LUCENE与SPIDER的结合 15
3.3.1如何解析
HTML 16
3.4 基于TOMCAT的WEB服务器 19
3.5在TOMCAT上部署项目 19
4 搜索引擎策略 21
4.1简介 21
4.2面向主题的搜索策略 21
4.2.1导向词 21
4.2.2网页评级 21
4.2.3权威网页和中心网页 22
结 论 23
参考文献 24
致 谢 25
引 言
面对浩瀚的网络资源,搜索引擎为所有网上冲浪的用户提供了一个入口,毫不夸张的说,所有的用户都可以从搜索出发到达自己想去的网上任何一个地方。因此它也成为除了电子邮件以外最多人使用的网上服务。
搜索引擎技术伴随着WWW的发展是引人注目的。搜索引擎大约经历了三代的更新发展:
第一代搜索引擎出现于1994 年前后。以Altavista, Yahoo 和Infoseek为代表,注重反馈结果的数量,主要特征是"求全"。它主要依靠人工分拣的分类目录搜索,通常由网页制作人自行建立网站名称、网站