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

Chapter 1. Google-like Web Search

Text search problems are one of the key and common use cases for web-based applications. Developers over the world have been keen to bring an open source solution to this problem. Hence, the Lucene revolution happened. Lucene is the heart of most of the search engines that you see today. It basically accepts the text that is to be searched, stores it in an easy searchable form or data structure (inverted index), and then accepts various types of search queries and returns a set of matching results. After the first search revolution, came the second one. Many server-based search solutions, such as Apache SOLR, were built on top of Lucene and marked the second phase of the search revolution. Here, a powerful wrapper was made to interface web users that wanted to index and search text of Lucene. Many powerful tools, notably SOLR, were developed at this stage of revolution. Some of these search frameworks were able to provide document database features too. Then, the next phase of the search revolution came, which is still on-going. The design goal of this phase is provide scaling solutions for the existing stack. Elasticsearch is a search and analytic engine that provides a powerful wrapper to Lucene along with an inbuilt document database and provisions various scaling solutions. The document database is also implemented using Lucene. Though competitors of Elasticsearch have some more advanced feature sets, those tools lack the simplicity and the wide range of scalability solutions Elasticsearch offers. Hence, we can see that Elasticsearch is the farthest point to which the search revolution has reached and is the future of text search.

This chapter takes you along the course to build a simple scalable search server. We will see how to create an index and add some documents to it and try out some essential features such as highlighting and pagination of results. Also, we will cover topics such as how to set an analyzer for our text and how to apply filters to eliminate unwanted characters such as HTML tags, and so on.

Here are the important topics that we will cover in this chapter:

  • Deploying Elasticsearch
  • Concept of the head UI shards and replicas
  • Index – type mapping
  • Analyzers, filters, and tokenizers
  • The head UI

Let's start and explore Elasticsearch in detail.

主站蜘蛛池模板: 德江县| 绥宁县| 盘山县| 华池县| 怀仁县| 凉山| 剑川县| 阿城市| 墨玉县| 鹤山市| 准格尔旗| 肃宁县| 江华| 滕州市| 固原市| 乐平市| 靖宇县| 那曲县| 牙克石市| 汝州市| 乌什县| 平阴县| 井研县| 吉木萨尔县| 宝鸡市| 通州市| 东辽县| 兰坪| 洪洞县| 房产| 大港区| 宾阳县| 应城市| 茂名市| 孝义市| 新竹市| 道孚县| 洪泽县| 永宁县| 普宁市| 南城县|