Lucene是一个用Java写的全文检索引擎工具包,面向对象多层封装,提供了一个低耦合、与平台无关的、可进行二次开发的全文检索引擎架构,是这几年最受欢迎的信息检索程序库;基于流式Socket的网络编程是设计网络通信程序的一种有效方法。本文基于Lucene,采用中文分词技术,设计并实现了中文搜索引擎,同时应用Java和PHP的Socket网络编程技术,实现了外网通过PHP网页使用Lucene服务的功能。
Lucene is a full-text search engine toolkit written in Java, an object-oriented, multi-tier package that provides a low-coupling, platform-independent and full-text search engine architecture. The network programming based on streaming Socket is an effective method to design the network communication program. Based on Lucene, this paper designs and implements the Chinese search engine by using Chinese word segmentation technology. At the same time, it uses Java and PHP Socket network programming technology to realize the function of using Lucene service through PHP website.