Elasticsearch官网
本文是自己在学习Elasticsearch的过程中,记下的觉得非常有用的笔记,希望对大家认识Elasticsearch有一点点帮助。
1. 什么是Elasticsearch
官网上是这么介绍的:
- Elasticsearch is a distributed document store. Instead of storing information as rows of columnar data,Elasticsearch stores complex data structures that have been serialized as JSON documents. When you have multiple Elasticsearch nodes in a cluster, stored documents are distributed across the cluster and can be accessed immediately from any node.
(Elasticsearch 是一个分布式文档存储系统。与将信息存储为行列数据不同,Elasticsearch 存储复杂的数据结构,这些数据结构被序列化为 JSON 文档。当您有多个 Elasticsearch 节点组成集群时,存储的文档会分布在整个集群中,并可以从任何节点立即访问。)- When a document is stored, it is indexed and fully searchable in near real-time–within 1 second. Elasticsearch uses a data structure called an inverted index that supports very fast full-text searches. An inverted index lists every unique word that appears in any document and identifies all of the documents each word occurs in.
(当存储文档时,它被索引并可以在接近实时内完全搜索,通常在 1 秒内。Elasticsearch 使用一种称为倒排索引的数据结构,支持非常快速的全文搜索。倒排索引列出了出现在任何文档中的每个唯一单词,并标识每个单词出现在的所有文档。)- An index can be thought of as an optimized collection of documents and each document is a collection of fields, which are the key-value pairs that contain your data. By default, Elasticsearch indexes all data in every field and each indexed field has a dedicated, optimized data structure. For example, text fields are stored in inverted indices,and numeric and geo fields are stored in BKD trees. The ability to use the per-field data structures to assemble and return search results is what makes Elasticsearch so fast.
(索引可以被视为经过优化的文档集合,每个文档都是包含数据的键-值对的集合。默认情况下,Elasticsearch 索引所有字段中的所有数据,并且每个索引字段都有一个专用的优化数据结构。例如,文本字段存储在倒排索引中,而数字和地理字段存储在 BKD 树中。使用每个字段的数据结构来组装和返回搜索结果是使 Elasticsearch 如此快速的能力。)
Elasticsearch
是一种开源的分布式搜索和分析引擎,最初由Elastic公司开发。它被广泛用于处理大规模数据集,进行实时搜索和分析,特别适用于日志分析、文档检索、监控数据分析和全文搜索等应用。
Elasticsearch
的主要特点和用途包括:
-
实时搜索:能够快速索引和搜索大规模的数据集,使用户能够实时搜索和获取数据。
-
分布式架构:采用分布式架构,可以轻松扩展到多个节点,实现高可用性和负载均衡。
-
多种数据类型支持:支持各种数据类型,包括文本、数值、地理位置信息等,使其适用于多种应用场景。
-
多功能性:不仅可以用于全文搜索,还可以用于聚合、分析、数据可视化和监控等任务。
-
开放源代码