十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
https://www.elastic.co/cn/

分布式搜索
数据分析
分组和聚合
https://www.elastic.co/cn/downloads/
node.name: node-1
// 这个很重要
http.host: 0.0.0.0
http.port: 9200
-Xms256M
-Xmx256M
chown -R esuser:esuser /usr/local/software/elasticsearch-7.2.0
su esuser
sh elasticsearch -d
curl -X GET "http://localhost:9200"
es重启后会加载ik
curl -X PUT "localhost:9200/post"
POST post/_close
PUT post/_settings
{
"number_of_replicas": 0,
"index":{
"analysis.analyzer.default.type":"ik_max_word",
"analysis.search_analyzer.default.type":"ik_smart"
}
}
POST post/_open
curl --location --request PUT '787k.fun:9200/post/_mapping' \
--header 'Content-Type: application/json' \
--data-raw '{
"properties": {
"id": {
"type": "integer"
},
"title": {
"type": "text"
},
"content": {
"type": "text"
},
"blogImg": {
"type": "keyword"
},
"html_content": {
"type": "keyword"
},
"authorId": {
"type": "integer"
},
"authorName": {
"type": "keyword"
},
"tag": {
"type": "integer"
},
"type": {
"type": "integer"
},
"status": {
"type": "integer"
},
"commentCount": {
"type": "integer"
},
"score": {
"type": "double"
},
"created": {
"type": "date"
},
"updated": {
"type": "date"
}
}
}'
org.elasticsearch.client
elasticsearch-rest-high-level-client
7.2.0
org.elasticsearch
elasticsearch
7.2.0
elasticsearch.host=localhost
elasticsearch.port=9200