1、ES增删改查操作
https://blog.csdn.net/UbuntuTouch/article/details/123839857
https://huaweicloud.csdn.net/637ef6b7df016f70ae4cac57.html
2、java与ES8相关maven依赖
https://blog.csdn.net/boling_cavalry/article/details/125351161
3、kibana下载数据
文章来源:https://www.toymoban.com/news/detail-732944.html
3、kibana相关操作文章来源地址https://www.toymoban.com/news/detail-732944.html
POST poi
{
"index_patterns": ["poi*"],
"template" : {
"settings" : {
"index" : {
"number_of_shards" : "1",
"number_of_replicas" : "1"
}
},
"mappings" : {
"dynamic": "strict", // 严格模式,不允许动态创建字段
"properties" : {
"city" : {
"type" : "keyword"
},
"region" : {
"type" : "keyword"
},
"name" : {
"type" : "text"
},
"location" : {
"type" : "geo_point" // 地址坐标点类型,可以进行范围搜索
}
}
}
}
}
DELETE model_request_log
GET _index_template/poi
PUT my_test/_doc/12312
{
"userId":"213",
"stuNo":1312
}
PUT model_request_log
{
"settings":{
"number_of_replicas": 1,
"number_of_shards":3
},
"mappings":{
"properties":{
"key":{
"type": "keyword"
},
"requestData":{
"type": "keyword"
},
"responseData":{
"type": "keyword"
},
"costTime":{
"type":"long"
}
}
}
}
GET my_test/_mapping
GET model_request_log_20230919/_search
{
"query":{"match_all":{}}
}
POST _index_template/model_request_log
{
"index_patterns": ["model_request_log_*"],
"template" : {
"settings" : {
"index" : {
"number_of_shards" : "3",
"number_of_replicas" : "1"
}
},
"mappings" : {
"dynamic": "strict", // 严格模式,不允许动态创建字段
"properties" : {
"key":{
"type": "keyword"
},
"requestData":{
"type": "keyword"
},
"responseData":{
"type": "keyword"
},
"costTime":{
"type":"long"
}
}
}
}
}
GET _index_template/model_request_log
到了这里,关于Elasticsearch8.X与java调用的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!