首发博客地址

首发博客地址

系列文章地址

教学视频


为什么要学习 ES?

  1. 强大的全文搜索和检索功能:Elasticsearch 是一个开源的分布式搜索和分析引擎,使用倒排索引和分布式计算等技术,提供了强大的全文搜索和检索功能。学习 ES 可以掌握如何构建复杂的查询、使用各种过滤器和聚合操作来优化搜索结果。

  2. 实时数据分析和处理:ES 支持实时数据的索引和查询,可用于处理大规模的实时数据。学习 ES 可以了解如何使用 ES 进行实时数据的分析和处理,包括日志分析、事件处理、实时监控等。

  3. 分布式存储和扩展性:ES 是一个分布式系统,可以将数据分布在多个节点上,以提高存储容量和查询性能。学习 ES 可以帮助了解如何搭建和管理分布式 ES 集群,以及如何优化集群的性能和可靠性。

  4. 文档导入和处理:ES 支持各种数据源的导入和处理,包括数据库、文件、API 等。学习 ES 可以掌握如何将不同数据源的数据导入到 ES 中,并进行相应的处理和转换。

  5. 日志分析和搜索引擎优化:ES 在日志分析和搜索引擎优化方面有很大的应用价值。学习 ES 可以学会如何利用 ES 进行日志的实时分析和搜索,以及如何优化搜索引擎的性能和相关性。

  6. 全文搜索引擎的开发和应用:ES 是一个非常流行的全文搜索引擎,许多企业和项目都在使用 ES 构建全文搜索功能。学习 ES 可以提供开发全文搜索引擎的技能和经验,为职业发展增添竞争力。

总结起来大概就是:

  • 分布式搜索引擎
  • 大数据实时分析引擎

官网

官网地址

ES 发展历史

Elasticsearch (ES)的发展历史可以追溯到 2004 年,当时 Shay Banon 创建了一个名为 Compass 的开源项目,作为一个基于 Lucene 的全文搜索引擎库。

随着时间的推移,Compass 逐渐发展成为一个独立的搜索引擎,但在 2009 年,Shay Banon 决定重新设计和重构该项目,以解决一些困扰他的设计和架构问题。于是,他创建了一个新的项目,命名为"elasticsearch",并于 2010 年开源发布。

以下是 ES 的主要发展里程碑:

  • 2010 年:Elasticsearch 首次开源发布。它基于 Apache Lucene 构建,提供了一个分布式搜索和分析引擎,用于实时数据的索引和查询。

  • 2013 年:Elasticsearch 正式成为 Elastic 公司的核心产品,并开始受到广泛关注和采用。此时,Elasticsearch 已经成为开源搜索引擎的领导者之一。

  • 2014 年:Elasticsearch 发布了 1.0 版本,这是一个重要的里程碑,标志着 ES 的稳定性和成熟度。1.0 版本引入了一些重要的特性和改进,如聚合操作和索引别名等。

  • 2015 年:Elasticsearch 发布了 2.0 版本,引入了许多重要的功能和改进,包括复合索引、文档级别的更新和删除、分布式索引排序等。

  • 2016 年:Elasticsearch 发布了 5.0 版本,这是一个重要的版本发布,引入了许多重大的改进和变化。5.0 版本引入了新的分布式文档存储方式,并且废弃了一些旧的功能和 API。

  • 2019 年:Elasticsearch 发布了 7.0 版本,这是一个重要的版本发布,引入了许多重要的功能和改进。7.0 版本引入了 Elasticsearch 的新分布式协调引擎,称为"Zen 2",以提高集群的稳定性和性能。

  • 2022 年:Elasticsearch 发布了 8.0 版本,这是一个重要的版本发布,引入了许多重要的功能和改进。原生支持 NLP,速度、扩展和检索相关性提升,通过原生矢量搜索提高搜索相关性,默认开启安全功能

随着时间的推移,Elasticsearch 不断发展壮大,成为一个功能强大、可靠性高的分布式搜索和分析引擎。它被广泛应用于各种场景,包括日志分析、实时数据处理、全文搜索和商业智能等。并且,Elastic 公司也推出了其他产品,如 Kibana、Logstash 和 Beats 等,构建了一个完整的数据分析和可视化平台,被称为"Elastic Stack"或"ELK Stack"。

去官网上瞄了一眼,还支持 GPT 了..牛逼,大概看了文章说的是,通过插件可以访问 ES 内容,厉害了,有兴趣可以点击下面链接看看:

【ChatGPT】Elasticsearch 插件:将 ChatGPT 引入 Elasticsearch

安装虚拟机

如果你是本地练习,可以参考这篇文章安装 Linux 系统环境: https://blog.zysicyj.top/4e7b516e

环境兼容性检查

这里一定要确认好 jdk 版本,比如 8.8 支持 jdk19,8.9 不支持 jdk19,但是所有 8.x 都是支持 17 的,因为 17 是 LTS 版本。

所以建议大家安装 jdk17,兼容性比较高

兼容性检查

准备安装包

官网下载:https://www.elastic.co/cn/downloads/elasticsearch

关注【程序员朱永胜】回复【1021】不限速下载

安装 es

yum install elasticsearch-8.9.1-x86_64.rpm

systemctl daemon-reload
systemctl enable elasticsearch.service

修改配置文件

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# [https://www.elastic.co/guide/en/elasticsearch/reference/index.html](https://www.elastic.co/guide/en/elasticsearch/reference/index.html "https://www.elastic.co/guide/en/elasticsearch/reference/index.html")
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: 0.0.0.0
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false #----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 31-08-2023 09:48:01
#
# -------------------------------------------------------------------------------- # Enable security features
xpack.security.enabled: false
xpack.ml.enabled: false xpack.security.enrollment.enabled: true # Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12 # Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: false
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["localhost.localdomain"] # Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0 # Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0 #----------------------- END SECURITY AUTO CONFIGURATION -------------------------

启动并校验 es

systemctl start elasticsearch
systemctl status elasticsearch

出现这个画面基本是没问题了

[root@localhost elasticsearch]# curl -X GET "http://localhost:9200/"
{
"name" : "node-1",
"cluster_name" : "my-application",
"cluster_uuid" : "XAGRLef2SayyXzuNHPgX2Q",
"version" : {
"number" : "8.9.1",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "a813d015ef1826148d9d389bd1c0d781c6e349f0",
"build_date" : "2023-08-10T05:02:32.517455352Z",
"build_snapshot" : false,
"lucene_version" : "9.7.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}

本文由mdnice多平台发布

【ES系列】(一)简介与安装的更多相关文章

  1. nginx高性能WEB服务器系列之一简介及安装

    nginx系列友情链接:nginx高性能WEB服务器系列之一简介及安装https://www.cnblogs.com/maxtgood/p/9597596.htmlnginx高性能WEB服务器系列之二 ...

  2. ES系列二、CentOS7安装ES head6.3.1

    1.Head插件简介 ElasticSearch-head是一个H5编写的ElasticSearch集群操作和管理工具,可以对集群进行傻瓜式操作. 显示集群的拓扑,并且能够执行索引和节点级别操作 搜索 ...

  3. ES系列一、CentOS7安装ES 6.3.1、集成IK分词器

    Elasticsearch 6.3.1 地址: wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3. ...

  4. 【MongoDB系列】简介、安装、基本操作命令

    文章内容概述: 1.MongoDB介绍 2.MongoDB安装(windows及Linux) 3.MongoDB基本操作命令 MongoDB介绍: MongoDB 是一个基于分布式文件存储的数据库.由 ...

  5. ES系列目录

    ES系列一.CentOS7安装ES 6.3.1 ES系列二.CentOS7安装ES head6.3.1 ES系列三.基本知识准备 ES系列四.ES6.3常用api之文档类api ES系列五.ES6.3 ...

  6. ES系列十七、logback+ELK日志搭建

    一.ELK应用场景 在复杂的企业应用服务群中,记录日志方式多种多样,并且不易归档以及提供日志监控的机制.无论是开发人员还是运维人员都无法准确的定位服务.服务器上面出现的种种问题,也没有高效搜索日志内容 ...

  7. ES系列十六、集群配置和维护管理

    一.修改配置文件 1.节点配置 1.vim elasticsearch.yml # ======================== Elasticsearch Configuration ===== ...

  8. [转载]【虚拟化系列】VMware vSphere 5.1 简介与安装

    转载自:http://mabofeng.blog.51cto.com/2661587/1017680 一. VMware vSphere 5.1简介           vSphere是VMware推 ...

  9. Redis系列(一):Redis的简介与安装

    原文链接(转载请注明出处):Redis系列(一):Redis的简介与安装 什么是 Redis Redis 是一个使用ANSI C 编写的开源.支持网络协议.基于内存.可选持久性的键值对数据库,它是一个 ...

  10. 【虚拟化系列】VMware vSphere 5.1 简介与安装

    一. VMware vSphere 5.1简介           vSphere是VMware推出的基于云计算的新一代数据中心虚拟化套件,提供了虚拟化基础架构.高可用性.集中管理.监控等一整套解决方 ...

随机推荐

  1. Volcano 原理、源码分析(二)

    0. 总结前置 1. 概述 2. 寻找调度器中的 PodGroup 2.1 从 PodGroup 到 JobInfo 的封装 2.2 从 Pod 到 TaskInfo 的封装 3. 控制器中 PodG ...

  2. 川普真会说中文?连嘴型都同步,用VideoReTalking一键生成你的AI播报员

    你能想到这种画面吗?霉霉在节目中用普通话接受采访,特朗普在老家用中文脱口秀,蔡明老师操着一口流利的英文调侃潘长江老师.. 这听起来似乎很魔幻,可如今全部由VideoReTalking实现了 你只需要传 ...

  3. 一些Mybatis的知识点&易错点总结

    1.映射文件配置容易出错 在映射文件中,我们习惯性在sql语句后面添加';'. 结果是报了一堆错误: org.apache.ibatis.exceptions.PersistenceException ...

  4. Spring源码学习笔记6——Spring bean的实例化

    一丶前言 前面我们了解到读取xml or 根据扫描路径生成BeanDefinition并注册到BeanFactory,相当于我们具备了生火做饭的原材料:BeanDefinition,接下来就是Spri ...

  5. 华为云GaussDB助力工商银行、华夏银行斩获“十佳卓越实践奖”

    近日,2023金融街论坛年会在北京成功举办.活动期间,由北京金融科技产业联盟举办的全球金融科技大会系列活动--分布式数据库金融应用研究与实践大赛获奖结果正式公布.其中,由华为云GaussDB参与支持的 ...

  6. 上手测试GaussDB(for Redis) 和开源 Redis,只为推荐质优价廉的Redis

    摘要:一文带你全方位测评 GaussDB(for Redis) 和开源 Redis. 本文分享自华为云社区<程序员硬核测评:全方位测评 GaussDB(for Redis) 和开源 Redis& ...

  7. 4种Spring Boot 实现通用 Auth 认证方式

    摘要: 文章介绍了 spring-boot 中实现通用 auth 的四种方式,包括传统 AOP.拦截器.参数解析器和过滤器,并提供了对应的实例代码,最后简单总结了下它们的执行顺序. 本文分享自华为云社 ...

  8. 讲透学烂二叉树(三):二叉树的遍历图解算法步骤及JS代码

    二叉树的遍历是指不重复地访问二叉树中所有结点,主要指非空二叉树,对于空二叉树则结束返回. 二叉树的遍历分为 深度优先遍历 先序遍历:根节点->左子树->右子树(根左右),有的叫:前序遍历 ...

  9. Nginx在windows下常用命令

    cmd 进入Nginx解压目录 执行以下命令 start nginx : 启动nginx服务 nginx -s reload :修改配置后重新加载生效 nginx -s reopen :重新打开日志文 ...

  10. 干掉 LaTeX !用BookDown写本书

    Bookdown是著名R包作者谢益辉开发的,支持采用Rmarkdown (R代码可以运行)或普通markdown编写文档,然后编译成HTML, WORD, PDF, Epub等格式. bookdown ...