
Elasticsearch
lian@qiao
这个作者很懒,什么都没留下…
展开
-
Elasticsearch常用API——Document APIs
一、文档API1、增使用PUT方法、指定索引名称、文档类型,文档id可指定也可以不指定,让系统自动生成。PUT indexName/_type/id{ "xx" : "xxx", "xxx" : "xxx"}#curl:curl -X PUT "localhost:9200/indexName/_type/id?pretty" -H 'Content-Type: application/json' -d'{ "xx" : "xxx", "xxx" : "xx原创 2021-03-12 16:44:18 · 202 阅读 · 0 评论 -
读取Elasticsearch中数据并写入到json中
读取ES中数据,并将数据写入到json中from elasticsearch6 import Elasticsearchimport jsondef elasic_data(classID,predn): # 连接ES ES = [ 'xx.xx.xxx:9200' ] es = Elasticsearch(ES, http_auth=('user', 'password'), sniff_on_start=True,原创 2021-03-12 09:47:13 · 614 阅读 · 0 评论 -
Elasticsearch安装
@ElasticSearch安装Elasticsearch安装一. 用root账号修改系统变量。1. 设置虚拟内存永久设置:修改 /etc/sysctl.conf 增加 vm.max_map_count=262144以上修改需要重启系统,如果不重启系统,可以用命令生效:sysctl -w vm.max_map_count=2621442. 修改用户文件描述数量限制及线程池数量限制...原创 2018-12-02 15:51:58 · 162 阅读 · 0 评论 -
Elasticserch-head详细介绍以及搜索说明
一、Elasticserch-head安装1、最简单方法使用翻墙软件下载Elasticsearch插件chrome-extension://ffmkiejjmecolpfloofpjologoblkegm/elasticsearch-head/index.html也可以直接在设置->扩展程序中搜索安装二、Elasticserch基本概念介绍节点安装ES时,创建的ES实例就是节...原创 2018-12-02 17:47:45 · 1522 阅读 · 0 评论 -
Elasticsearch 备份和还原
最近公司产品将一部分数据存在Elasticsearch中,demo数据希望可以做到每天还原为标准数据,所以学习了下Elasticsearch的备份还原,特此记录下来。Elasticsearch 备份Elasticsearch提供了snapshot API ,它会将集群里当前的状态和数据然后保存到一个共享仓库里。创建备份仓库使用备份API前,需要先创建仓库,有多个仓库类型以供选择:共享文...原创 2019-04-20 16:24:16 · 3790 阅读 · 1 评论 -
Elasticsearch使用密码查询
Elasticsearch设置用户名密码之后,不能再直接使用Elasticsearch head 访问,可以在查询等API上加上用户等参数:curl -XGET --user user:passwd 'http://XX:9200/XX/XXX'比如想要清空某个索引下的数据: curl -XPOST --user admin:admin 'http://XX:9200/cmdbcicla...原创 2019-04-29 23:04:20 · 10328 阅读 · 0 评论 -
Elasticsearch 备份和还原--还原到其他ES集群等操作
ES基本备份还原操作详见上篇:Elasticsearch 备份和还原https://blog.youkuaiyun.com/lianisgood/article/details/89419317还原为其他ES集群官方文档关于还原到其他ES集群的描述为:“存储在快照中的信息不依赖于特定群集或群集名称。因此,可以将从一个群集创建的快照还原到另一个群集。所需的只是在新集群中注册包含快照的存储库并启动还原过程。...原创 2019-09-04 13:16:14 · 1843 阅读 · 0 评论