ElasticSearch 学习笔记之踩坑日记 作者: lovingyu_er 时间: 2020-12-28 18:44:00 分类: Elasticsearch 评论 ###错误1: ``` A PHP Error was encountered Severity: Warning Message: require_once(/var/www/html/tvupd/website/application/libraries/Elasticsearch/Endpoints/AbstractEndpoint.php): failed to open stream: No such file or directory Filename: ip/Loader.php Line Number: 11 ``` 解决建议:请查看自己的PHP版本是否满足```Elasticsearch-PHP```的版本要求,我的系统是php7.0.3而升级到php7.4.13才没有问题. - 阅读剩余部分 -
Elasticsearch学习笔记之安装篇(7.x) 作者: lovingyu_er 时间: 2020-12-28 17:20:00 分类: Elasticsearch 评论 本章内容,主要是介绍elasticsearch最新版本的安装(apt) ####Linux系统版本 ``` Ubuntu 16.04.7 LTS \n \l ``` ``` Linux hostname 4.4.0-194-generic #226-Ubuntu SMP Wed Oct 21 10:19:36 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux ``` #### 安装部署: #####1. PGP key 的添加 在安装之前,首先要获取到```elasticsearch```的```PGP key```,这个官方给了一个线上更新的方法,```elsaticsearch```已经将所有的包进行的```PGP key```的授权,简单的使用方式就是: - 阅读剩余部分 -
Elasticsearch -PHP 查询 ( Version 7.x) 作者: lovingyu_er 时间: 2020-12-04 09:56:00 分类: Elasticsearch 评论 ####ElasticSearch-PHP库索引文档 索引文档,是增加文档的一种方式(增加文档->类似mysql中插入数据,请自行转换概念:文档->mysql中表的一条记录) ####indexAPI ```ElasticSearch index```方法的作用: ``` Adds a JSON document to the specified data stream or index and makes it searchable. If the target is an index and the document already exists, the request updates the document and increments its version. ``` 如果文档已经存在,该方法就会更新文档,并且递增该文档的版本号。 注意: ``` You cannot use the index API to send update requests for existing documents to a data stream ``` 不要使用``` index API``` 去更新一个已经存在的文档到数据流 #### x-Pack插件 一个集安全、警报、监视、报告和图形功能于身的扩展,轻松开启或关闭那你想要的功能。
ElasticSearch学习笔记(四) ElasticSearch为什么要移除mapping type的映射 作者: lovingyu_er 时间: 2020-12-03 19:10:00 分类: 编程语言,Elasticsearch 评论 ####问题 今天在使用elasticSearch的type的时候,发现在创建所以的时候: ``` PUT localhost:9200/rds_channel?pretty ``` - 阅读剩余部分 -
Elasticsearch学习笔记之二:Elasticsearch入门 作者: lovingyu_er 时间: 2020-04-19 14:10:00 分类: 生活小文艺,Elasticsearch,朝花夕拾 评论 ###Elasticsearch入门 ####1. 安装部署:(```https://www.darrykinger.com```) ElasticSearch提供了Free版本的线上案例,根据文档提示一步步的提示创建可以,链接地址: ``` https://www.elastic.co/guide/en/elasticsearch/reference/master/getting-started-install.html#getting-started-install ``` 当前,本次学习,为了方便环境的部署和搭建,我统一使用 ```docker``` 进行搭建,关于docker的相关知识,可以在搜索引擎中输入 ```Docker菜鸟教程``` 进行学习,里面的基础知识,基本可以满足我们的平时开发所需要的基本环境。 运行: ``` sudo docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -d docker.elastic.co/elasticsearch/elasticsearch:7.8.0 ``` 通过```ps aux ```或者```sudo netstat -lnp```查看端口,就可以看到```elasticsearch```在```docker```内运行。我们也可以通过```http```进行访问端口: 在浏览器中键入: ``` http://my_server_ip :9200/ ``` 输出结果: ``` { "name" : "834417681f5b", "cluster_name" : "docker-cluster", "cluster_uuid" : "GZLOhm00QhOeRTxHyrg7QQ", "version" : { "number" : "7.8.0", "build_flavor" : "default", "build_type" : "docker", "build_hash" : "757314695644ea9a1dc2fecd26d1a43856725e65", "build_date" : "2020-06-14T19:35:50.234439Z", "build_snapshot" : false, "lucene_version" : "8.5.1", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" } ``` 就可以看到搭建好的```elasticSearch```的一些基本信息