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

相关内容

热门资讯

iphonex系统升级安卓,探... 你有没有发现,最近身边的朋友都在议论纷纷,说他们的iPhone X要升级系统了?没错,就是那个一直备...
安卓原生系统是怎样,从源代码到... 你有没有想过,为什么你的安卓手机总是那么流畅,那么个性化?这背后,就是安卓原生系统的神奇魅力。今天,...
安卓系统触屏校验,技术解析与实... 你有没有遇到过这种情况?手机屏幕上突然跳出个验证码,让你输入验证码才能继续操作。这可不是什么新鲜事,...
安卓系统重做系统怎么弄,轻松实... 手机用久了,是不是觉得安卓系统有点卡,想给它来个大变身?别急,今天就来手把手教你如何给安卓系统来个焕...
1520怎么用安卓系统,安卓系... 你手里那台1520安卓系统手机,是不是还在犹豫怎么玩转它呢?别急,今天就来给你详细说说,怎么让这台老...
安卓系统丢了怎么定位,安卓系统... 手机里的安卓系统突然不见了,这可怎么办呢?别急,今天就来教你怎么定位丢失的安卓系统,让你的手机重新找...
安卓系统加入视频解码,安卓系统... 你知道吗?最近安卓系统又来了一次大升级,这次可是加入了视频解码功能哦!是不是听起来就让人兴奋不已?那...
如何升级安卓系统手机,安卓系统... 亲爱的手机控们,是不是觉得你的安卓手机用久了,速度越来越慢,功能也越来越不给力?别急,今天就来教你怎...
安卓系统能按塞班系统吗,跨越时... 你有没有想过,安卓系统和塞班系统,这两个在手机江湖里曾经风头无两的操作系统,它们之间能不能来个亲密接...
安卓手机系统更新废了,探索系统... 最近我的安卓手机系统更新后,简直让我头疼得要命!你是不是也遇到了类似的问题?今天就来聊聊这个让人抓狂...
安卓苹果系统互传应用,安卓与苹... 你有没有想过,手机之间的文件传输竟然也能变得如此轻松愉快?没错,就是那个让安卓和苹果用户都为之欢呼的...
magic ui 2.0系统不... 亲爱的读者们,你是否曾在使用手机时,对那神秘的界面设计感到好奇?今天,就让我带你一探究竟,揭开Mag...
用回iphone安卓系统版本,... 你有没有想过,为什么有些人会从安卓系统切换回iPhone呢?这背后可是有着不少故事和原因哦!今天,就...
安卓系统辅助在哪关闭,轻松关闭... 你有没有发现,安卓系统的辅助功能真是贴心到不行啊!不过,有时候这些功能太多,用起来有点乱糟糟的。别急...
安卓系统降级教程图片,图片解析... 手机用久了,是不是觉得安卓系统越来越卡,想回到那个流畅如丝的年代?别急,今天就来教你怎么给安卓系统来...
安卓系统设置桌面布局,打造个性... 你有没有发现,手机桌面乱糟糟的,看着都头疼?别急,今天就来教你如何巧妙地设置安卓系统的桌面布局,让你...
安卓怎么设置谷歌系统,这里不提... 你有没有想过,你的安卓手机里藏着一个小小的谷歌世界?没错,就是那个全球最流行的操作系统——安卓,它其...
安卓系统甩位软件,轻松导航新体... 你有没有发现,手机里的安卓系统越来越智能了?这不,最近我发现了一个超级好用的甩位软件,简直让我爱不释...
安卓系统接入固态硬盘,速度与稳... 你有没有想过,你的安卓手机或者平板,是不是也能像电脑一样,装上固态硬盘,瞬间提升速度和存储空间呢?今...
rx5 安卓系统,功能解析与使... 你有没有发现,现在汽车界也开始玩起了智能科技?没错,我说的就是那款风头正劲的rx5,它搭载的安卓系统...