es:下载elasticsearch以及基本介绍

简介

Elasticsearch 是一个基于 Lucene 的开源、分布式、RESTful 搜索引擎。

使用场景:海量数据的搜索

和 Lucene 的关系

Lucene:最先进,功能最强大的搜索库。如果直接基于Lucene开发,非常复杂,api复杂。

Elasticsearch:基于Lucene,封装了许多Lucene的底层功能,提供简单易用的restful api接口和许多语言的客户端,如Java的高级客户端(Java High Level Rest Client)和底层客户端(Java Low Level Rest Client)

和 mysql 的关系

下载

brew下载

shell 复制代码
brew install elastic/tap/elasticsearch-full
shell 复制代码
brew services start elastic/tap/elasticsearch-full
# if you don't want/need a background service you can just run
/opt/homebrew/opt/elasticsearch-full/bin/elasticsearch

官网下载

https://www.elastic.co/cn/downloads/elasticsearch

下载后解压,进入 bin 目录并执行 .elasticsearch

相关命令

shell 复制代码
elasticsearch --version
# 启动
elasticsearch
# 浏览器输入
localhost:9200

9300 端口为 Elastic s earch 集群间组件的通信端口,

9200 端口为浏览器访问的 http协议 RESTful 端口。

安装目录&配置文件

安装目录

shell 复制代码
Data:    /opt/homebrew/var/lib/elasticsearch/elasticsearch_zhangyu/
Logs:    /opt/homebrew/var/log/elasticsearch/elasticsearch_zhangyu.log
Plugins: /opt/homebrew/var/elasticsearch/plugins/
Config:  /opt/homebrew/etc/elasticsearch/

配置文件

shell 复制代码
[longshiyang@lsyPro elasticsearch ]$ vim elasticsearch.yml 
#======================== 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
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: elasticsearch_longshiyang
#
# ------------------------------------ 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: /usr/local/var/lib/elasticsearch/
#
# Path to log files:
#

path.logs: /usr/local/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 -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# Set a custom port for HTTP:
#
#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.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

操作

具体的 CRUD 操作后面更新

相关推荐
阿三08124 小时前
跨境电商售后自动化分级标准:哪些能全自动、哪些半自动、哪些禁止自动化
大数据·人工智能·自动化
游戏新手村6 小时前
蝴蝶图在餐饮门店数据可视化中的应用
大数据·信息可视化·产品经理·数据可视化
GlobalHRTalk7 小时前
埃及名义雇主EOR业务概述与市场发展优势分析
大数据·运维·人工智能
码云数智-园园8 小时前
Hyperf 协程 PHP 实战:传统 PHP 如何实现高并发服务
大数据
找方案8 小时前
北京砸1亿支持智能体:Agent创业迎来黄金窗口期
大数据·人工智能·microsoft
Elasticsearch8 小时前
你的 SLO 已经告急;下面介绍如何在 Elastic Observability 中找出罪魁祸首
elasticsearch
Black蜡笔小新8 小时前
EasyAIS+国标GB28181视频监控平台EasyCVR强强联动,全域视频AI识别能力落地!
大数据·人工智能·音视频
瓦学妹9 小时前
X(Twitter)新号如何防封?2026 养号与防限流全攻略
大数据·网络·人工智能·新媒体运营·twitter
EAIReport9 小时前
企业GEO全域运营技术落地路线与量化效果验证方案(AI大数据行业适配)
大数据·人工智能
希艾席帝恩10 小时前
生产车间智能升级背后,数字孪生发挥了什么作用
大数据·低代码·私有化部署·低代码平台·数字化转型