Elasticsearch8.X与java调用

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下载数据
在这里插入图片描述

3、kibana相关操作

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











  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值