官术网_书友最值得收藏!

Chapter 1. Introducing Lucene

Many applications in the modern era often require the handling of large datasets. Managing and searching these large collections of information can be very challenging, hence the creation of efficient and high performance search applications has become a necessity. For decades, many data scientists' research focused on information retrieval. One can say that the open source community now bears the fruits of this hard work as many open source data management platforms are developed. The Apache Software Foundation's answer to this: The Apache Lucene has gained popularity recently and is considered the go-to text search framework by many.

Let us take a look at the recipes that we are going to cover in this chapter:

  • Installing Lucene
  • Setting up a simple Java Lucene project
  • Obtaining an IndexWriter
  • Creating an analyzer
  • Creating fields
  • Creating and writing documents to an index
  • Deleting documents
  • Obtaining an IndexSearcher
  • Creating queries with the Lucene QueryParser
  • Performing a search
  • Enumerating results

Getting Lucene and setting up a Lucene Java project serves as a guide for you to get started with Lucene. Instructions to download and set up Lucene are covered in detail in these two recipes. All the recipes that follow introduce basic Lucene functionalities, which do not require in-depth knowledge to understand. We will learn how to create an index and add documents to an index. We will practice deleting documents and searching these documents to locate information. The Creating fields section of this chapter introduces you to Lucene's way of handling information. Then, we will learn how to formulate search queries. At the end of this chapter, we will show you how to retrieve search results from Lucene. Hopefully, by completing this chapter, you will gain enough knowledge to set up Lucene and have a good grasp of Lucene's concept of indexing and searching information.

主站蜘蛛池模板: 会宁县| 壤塘县| 阜城县| 壶关县| 高碑店市| 广南县| 华亭县| 建始县| 周宁县| 文安县| 和龙市| 余江县| 天祝| 长顺县| 鹤壁市| 湘潭市| 镇赉县| 鄂州市| 财经| 大悟县| 砚山县| 来凤县| 玉林市| 清河县| 阳原县| 奉新县| 丁青县| 密山市| 无锡市| 临清市| 洛扎县| 合江县| 临城县| 买车| 佛教| 三都| 和田县| 莱州市| 余江县| 五华县| 寻乌县|