Research and Application of Full-text Search Based on Lucene
- Author
- LuGuangHua
- Advisor
- ZhangJiaChen
- School
- Jilin University
- Major
- Software Engineering
- Classification
- TP391.3 Retrieval machine
- Degree
- Master's thesis
- Year
- 2009
- Downloads
- 413
- Citations
- 4
Abstract
In 2004, China Telecom began its transformation to an integrated information service provider. In the second half of 2005, China Telecom launched a new service -Best Tone, a voice search engine similar to Google, which was nicknamed "Voice Google". Best Tone is a series of value-added information services provided by China Telecom based on the telephone number information service, providing customers with a kind of facilitative service that relates to "clothing, feeding, housing, traveling and other consumptions". By dialing the service access number 114/118114, a customer can be provided with such information as food and beverage availability, tourist advice, road guide, hotel reservation and daily consumption articles.Best Tone system includes a number of subsystems, such as: basic information, corporate switchboard, etc. In this paper, we focus on the functions and realization of QC (Quality Control) subsystem, which is mainly used to store historical calls data and provide query interface for inspection personnel to conduct random checks on these data.In order to meet the requirements of the provincial company, we must be provided within three months of historical calls data for search. For this reason, the amount ofthese historical data is up to 10 million. In the old QC subsystem, we have used the database as a data storage/access layer, but we have found that this approach can’tmeet the requirements of applications:1. Low performance, it can’t search more than one week of historical data at one time.2. Side effect, it may have a negative effect on other business applications, since sharing the same database.3. Lack of scalability, it is difficult to meet the needs of future business development.Therefore, we will try to get a thorough study of these issues, and supply a solution to this problem finally: A new Lucene-based full-text search QC subsystem.Full-text search refers to the computer by scanning each article word by word, a word on each set up an index to indicate the words in the article in the frequency and location; when a query requesting, the search procedure searches the indexes and return the result to the user. This process is similar to the search dictionary by looking up the catalog.Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. The Lucene project lets us index the documents on our file system or web server so we can run combined full text and metadata searches. A full text search takes one or more words of a human language as a query and should return documents which are the "most relevant" for those words. The primary goal of Lucene is to provide a fast index and query implementation. Lucene is not, by itself, designed to be a complete user-facing index solution but rather to provide the heart of such a system.In this paper, we analyze the principle of Lucene firstly, including Lucene system architecture, source code structure, as well as the organizational structure of the inverted index file, and then expounded on the basic principle and process of indexing target data source and searching the index files. And, clear and concise introduction of several useful classes, as well as how to optimize the usage of these classes. On this basis, we summed up the steps and methods of Lucene-based development.By analyzing the structure of the original QC subsystems, we can know, because the original system used the traditional database technology as its data storage/access layer, the ability of database has been unable to meet the requirements and become a bottleneck on system performance. That should be our solution is the introduction of a new data persistence layer technology to replace the database in order to achieve breakthrough the performance bottlenecks. Through our reliability, scalability,maintainability and other areas of analysis, demonstrated that the Lucene-basedreconstruction is feasible, and give a new framework for program design, index structure design, query and maintenance of the logic design and system design for fault-tolerant as follows:1. On the design of framework, at the maximum in order to maintain the originalframework, data flow, without changing the other modules, the new QCsubsystem by way of independent modules to provide services and the use of the master-slaver pattern in order to ensure the availability of Service. In addition, use the request message directly to index and reduce dependence on the database and pressure.2. On the design of index structure, first of all is the designs of the corresponding document model based on the business model, and in accordance with business requirements for each field customizes the right indexing property. And, in order to avoid the maintenance and retrieval of large index file, wedesign of the store by day: in the three month data is divided into 31 days in order to improve the system’s maintainability and stability. Finally, in accordance with the performance and characteristics of Lucene, we use the memory for the current day date indexing and searching to improve the performance of the system.3. On the design of query logic, because the index files are divided into 31 days, so we can search these index files by using parallel-multi search technology:find out the serial number of target index files according to the query request, and then obtain the appropriate searchers to build a parallel-multi searcher and retrieval, at last, feedback to the user.4. On the design of maintenance logic, according to different business, mainly divided into: off-line rebuilding; real-time incremental indexing in memory; real-time modify and delete; optimize periodically. Because of the characteristics of inspection, the modification and deletion on these index files did not relate to cross-update.5. On the design of fault-tolerance, put forward three main strategies: automatic restore memory index; caches the request during the peer recovering, and thensynchronizes to peer; manually rebuild the index files. Among them, the first two are in order to guarantee the correctness of data; the latter is in order to ensure the maintainability of the system. Finally, on the basis of the above design, give the implementation, including common module, searching module, indexing module and index reconstruction module. In addition, this paper also gives some improvements for Lucene Boolean query and Wildcard query in order to improve performance of the system.At March 31, 2009, the system has been delivered, practice has proved that the new system has been designed to achieve the desired goal, and achieved good results.
Table of contents
Summary 4-7
Chapter 1 Introduction 7-9
1.1 background 7-8
1.2 of this article 8-9
Chapter 2, full-text search
About 9-13
2.1 full-text retrieval concept 9-10
2.2 full-text search and database systems 10-11
2.3 Java Open Source search engine Introduction 11-13
Chapter 3 the Lucene principle analysis 13-21
3.1 Lucene About 13-15
3.1.1 What is Lucene 13
3.1.2 Lucene features and advantages 13-15
3.2 Lucene system architecture analysis 15-17
3.2.1 Lucene system architecture 15-16
3.2.2 Lucene source organizational structure 16-17
3.3 Lucene index file format analysis 17-21
3.3.1 What is the inverted index 17
3.3.2 Lucene inverted index mechanism 17-19
conceptual structure and physical structure of
3.3.3 index files 19-21
Chapter 4, based on the Lucene application development methodology 21-27
4.1 of Lucene commonly used class of use and optimization of 21-25
4.2 based on the Lucene application development steps 25-27
Chapter 5
number of knowledgeable quality control system reconfiguration design 27-38
5.1 insufficient database quality control system 28-29
5.2 Feasibility analysis based on the Lucene reconstruction 29-30
5.3 reconstruction program design 30-38
5.3.1 framework design 30-32
5.3.2 Index Design 32-35
5.3.3 query logic and maintenance of logic design 35-37
5.3.4 system fault tolerance design 37-38
Chapter 6, the number of knowledgeable quality control system 38-48
6.1 public module to achieve 38-42
6.1.1 IndexWriter's package 38-39
6.1.2 IndexWriter and IndexSearcher management 39-40
6.1.3 end quality inspection data caching and synchronization 40-41
6.1.4 Data consolidation and optimization 41-42
6.2 retrieval module to achieve 42-43
6.2.1 filter design 42-43
6.2.2 retrieve the realization 43
6.3 The indexing module to achieve 43-46
6.3.1 dialogue Service records indexing 43-44
6.3.2 Satisfaction record indexing 44
6.3.3 on the standard of quality inspection records cited 44-45
6.3.4 memory index automatic recovery 45-46
6.4 index reconstruction module to achieve 46
6.5 of Lucene improve 46-48
6.5.1 the BooleanQuery improvements 47
6.5.2 vague 47-48
Chapter 7 Summary and outlook 48-49
7.1 summarize 48
7.2 Looking 48-49
References 49-51
thank 51-52
Summary 52-54
Abstract 54-56
Related dissertations
- Research on DBFS Technology and Implementation in Ocean Shipping Business Mail Management
- Study and optimization of Lucene inverted index based on Performance
- "Luder" Content Based Document Search Engine
- The Research and Implementation of Indexer Technology in Professional Search Engine System
- Research on Full-text Retrieval Technology in Education Resource Sharing System
- The Design and Implementation of the military document retrieval system
- Website Crawler and Retrieval System Based on Lucene
- Design and Implementation of Distributed Index and Search System Based on Cloud Platform
- The Research and Implementation of Full-Text System Based on Lucene and Textual Image
- Design and Implementation of Wireless City Full-Text Retrieval System Based on Lucene
- Research on Information Extraction and Full Text Retrieval of Crop Diseases Articles
- Research and Implementation of Nutch-Based Search Engine for Agricultural Information
- Research and Design of Search Within Application System Based on Lucene
- Design and implementation of a distributed real-time full text retrieval system based on Solr
- Design and Implementation of Full-Text Search System Based on Cloud Storage
- The Research and Implementation on Secure Index Technology Based on Full-text Searching System
- Military Literature Search Engine Architecture Research and Implementation
- The Research on a Lucene-based Full-text Retrieval Model
- The Research of Full-text Search Engine Key Technology Based on Lucene
- Application Study of Lucene Full-text Retrieval on the Network Education Platform