建设求职网站,不受国家管理的浏览器,天元建设集团有限公司第七建筑工程公司,wordpress 3.9.12参考#xff1a;
非常详细的阿里云服务器安装ElasticSearch过程..._阿里云服务器使用elasticsearch-CSDN博客
服务器平台#xff1a;AutoDL
注意#xff1a;
1、切换为非root用户#xff0c;su 新用户名#xff0c;否则ES无法启动
2、安装过程中没有出现设置账号密码…
参考
非常详细的阿里云服务器安装ElasticSearch过程..._阿里云服务器使用elasticsearch-CSDN博客
服务器平台AutoDL
注意
1、切换为非root用户su 新用户名否则ES无法启动
2、安装过程中没有出现设置账号密码但请求时需要鉴权可以关闭鉴权配置。
config- elasticsearch.yml- xpack.security.enabled false
创建索引
curl -X PUT http://localhost:9200/docs -H Content-Type: application/json -d
{mappings: {properties: {content: {type: text}}}
}插入数据
curl -X POST http://localhost:9200/docs/_doc -H Content-Type: application/json -d
{content: 干完这个活就出门遛弯
}通过python创建es对象并且进行bm25检索
from elasticsearch import Elasticsearchself.es_client Elasticsearch(http://127.0.0.1:9200)dsl {query: {match: {content: 想出门遛弯}},size: 3}search_result self.es_client.search(indexdocs, bodydsl) 本地kibana怎么连接远程ES
以AutoDL为例
注意本地kibana和远程服务器上的ES版本号要一致
AutoDL提供的SS H通道。host127.0.0.1port: 6006 STEP 1 修改ES的config-elasticresearch.yml, host和port配置 STEP2 修改kibama的config-kibana.yml, 修改对应的es host信息 STEP 3 服务器启动ES./bin/elasticsearch, 本地启动kibana ./bin/kibana
注意kibana config中server port 浏览器打开http:localhost:5602