es:下载elasticsearch以及基本介绍
创始人
2024-09-26 15:24:34
0

简介

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下载

brew install elastic/tap/elasticsearch-full 
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

相关命令

elasticsearch --version # 启动 elasticsearch # 浏览器输入 localhost:9200 

9300 端口为 Elastic s earch 集群间组件的通信端口,
9200 端口为浏览器访问的 http协议 RESTful 端口。

安装目录&配置文件

安装目录

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/ 

配置文件

[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 操作后面更新

相关内容

热门资讯

安卓手机好的系统,安卓手机操作... 你有没有发现,现在手机市场上的安卓手机真是琳琅满目,让人挑花了眼。不过,你知道吗?在这些安卓手机中,...
安卓系统mac电脑配置,打造安... 亲爱的电脑迷们,你是否曾想过,你的苹果笔记本里也能装上安卓系统?是的,你没听错!今天,就让我带你一起...
状元郎平板安卓系统,引领平板教... 你有没有想过,一款平板电脑,竟然能让你在学习之余,还能畅游安卓世界的海洋?没错,今天我要跟你聊聊的就...
安卓系统哪个传奇好玩,畅玩经典... 手机里的游戏可是咱们休闲娱乐的一大法宝,尤其是安卓系统,那丰富的游戏资源简直让人挑花眼。今天,就让我...
联众支持安卓系统吗,“联众PD... 斗地主爱好者们,是不是在为找不到一款好玩的斗地主游戏而烦恼呢?别急,今天我要给大家揭秘一个好消息——...
康佳电视安卓系统太卡,康佳电视... 亲爱的电视迷们,你们有没有遇到过这样的烦恼:家里的康佳电视用着用着就变得像蜗牛一样慢吞吞的,让人抓狂...
ios对比安卓系统流畅,流畅体... 你有没有发现,用手机的时候,有时候iOS系统就像个优雅的舞者,而安卓系统则像个活力四射的少年?没错,...
安卓系统占用内存小,深度解析优... 你有没有发现,手机用久了,就像人一样,会变得“臃肿”起来?尤其是安卓系统,有时候感觉就像一个超级大胃...
安卓系统怎么下载jdk,JDK... 你有没有想过,在安卓手机上也能编写Java程序呢?没错,就是那种在电脑上写代码的感觉,现在也能在手机...
安卓系统调手机亮度,轻松掌握手... 手机屏幕亮度总是让你眼花缭乱?别急,今天就来手把手教你如何轻松调节安卓系统的手机亮度,让你的手机屏幕...
学习机安卓系统双系统,安卓系统... 你有没有想过,学习机也能玩转安卓系统?没错,就是那个我们平时用来刷剧、玩游戏、看新闻的安卓系统!现在...
安卓系统有哪些兼职,盘点热门兼... 你有没有想过,在手机上也能轻松赚钱呢?没错,就是那个我们每天都离不开的安卓系统,它不仅能让你畅游网络...
别致影音下载安卓系统,轻松享受... 你有没有想过,在这个信息爆炸的时代,找到一款既别致又实用的影音下载APP,简直就像在茫茫人海中找到那...
安卓车机系统和手机系统,共筑智... 你有没有发现,现在汽车也越来越智能了?这不,车机系统都开始流行起来,而且很多车企都选择了安卓系统。那...
爱情银行ios系统与安卓系统,... 亲爱的读者们,今天咱们来聊聊一个让无数人心动的话题——爱情银行iOS系统与安卓系统!想象爱情银行就像...
车载wce系统和安卓系统区别,... 亲爱的车友们,你们有没有想过,为什么你的车载导航有时候会像老牛拉车一样慢吞吞,有时候又像兔子一样活泼...
安卓系统常见app取证,深度解... 你有没有想过,手机里的那些小玩意儿,其实可能藏着大大的秘密呢?没错,就是那些我们每天不离手的安卓系统...
苹果云照片安卓系统,苹果云照片... 你有没有想过,那些在苹果手机上美美哒的照片,怎么才能搬到安卓手机上呢?别急,今天就来给你揭秘这个神奇...
ios系统跟安卓系统都是美国,... iOS与安卓:美国科技的双雄争霸在当今这个数字化的世界里,智能手机已经成为了我们生活中不可或缺的一部...
深度系统可以装安卓,系统兼容安... 亲爱的读者们,你是否曾想过,在电脑上也能畅玩安卓游戏,享受安卓应用带来的便捷?现在,这个梦想成真啦!...