随笔分类 -  ES

摘要:1.索引慢日志 当遇到慢索引日志时,可以采取以下措施: 分析慢索引日志 慢索引日志记录了索引操作的详细信息,包括索引名称、操作类型、执行时间等。首先,查看慢索引日志,了解哪些索引操作比较慢。 优化索引设置 刷新间隔: 调整索引的刷新间隔(index.refresh_interval),减少频繁刷新带 阅读全文
posted @ 2024-08-01 16:26 SpecialSpeculator 阅读(103) 评论(0) 推荐(0) 编辑
摘要:elasticsearch 导出 elasticdump --input="http://username:password@domain-es.jdl.com/domain_slowlog_es_*" --output="D:\Software\es_slow_log_total.json" -- 阅读全文
posted @ 2024-07-15 18:05 SpecialSpeculator 阅读(52) 评论(0) 推荐(0) 编辑
摘要:elasticsearch java客户端 1.引用maven配置 <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactI 阅读全文
posted @ 2024-01-23 16:43 SpecialSpeculator 阅读(115) 评论(0) 推荐(0) 编辑
摘要:1.如果目标字段类型是keyword,可以用wildcard 语法进行查询 { "wildcard":{ "log_content":{ "wildcard":"*aaa*", "boost":1 } } } 配合使用 { "query":{ "bool":{ "must":[ { "terms": 阅读全文
posted @ 2023-12-06 16:02 SpecialSpeculator 阅读(2857) 评论(0) 推荐(0) 编辑
摘要:PUT _cluster/settings { "transient" : { "cluster.routing.allocation.node_concurrent_recoveries":4, "cluster.routing.allocation.cluster_concurrent_reba 阅读全文
posted @ 2023-10-19 16:47 SpecialSpeculator 阅读(61) 评论(0) 推荐(0) 编辑
摘要:# 1.delete by query场景 基于查询出来的数据进行删除 # 2.删除的定义 删除并不是直接物理文档删除,而是打标记 # 3.API POST index_name/_delete_by_query ```json { "query": { //这些是自定义查询条件,根据查询条件去批量 阅读全文
posted @ 2023-07-24 14:20 SpecialSpeculator 阅读(120) 评论(0) 推荐(0) 编辑
摘要:# refresh ## 1.es数据写入的流程 ![image](https://img2023.cnblogs.com/blog/680792/202306/680792-20230619110853612-1937471393.png) 对于任何数据库的写入来讲fsync刷盘虽然保证的数据的安 阅读全文
posted @ 2023-06-19 11:26 SpecialSpeculator 阅读(151) 评论(0) 推荐(0) 编辑
摘要:kibana生成饼图 ![image](https://img2023.cnblogs.com/blog/680792/202305/680792-20230526155243174-1157458196.png) 阅读全文
posted @ 2023-05-26 15:52 SpecialSpeculator 阅读(44) 评论(0) 推荐(0) 编辑
摘要:![image](https://img2023.cnblogs.com/blog/680792/202305/680792-20230526155016598-1825633586.png) 阅读全文
posted @ 2023-05-26 15:50 SpecialSpeculator 阅读(117) 评论(0) 推荐(0) 编辑
摘要:1.点击Visualize 2.创建Table的visualization 3.选择查询的索引 4.勾选查询条件 appName为delta-main sysName为jdl-delta appDeployPlatform为JDOS3_CN 5.选择先按照resourceType进行第一层group 阅读全文
posted @ 2023-05-11 14:29 SpecialSpeculator 阅读(360) 评论(0) 推荐(0) 编辑
摘要:类似于mysql 中的update set where 核心json VM,POD类型的 数据,并且host.network.bytes.outgoing字段不为null,并且时间窗口范围在。。。到。。。之间的 数据修改其中host.network.bytes.outgoing字段的值为null P 阅读全文
posted @ 2023-04-25 14:16 SpecialSpeculator 阅读(66) 评论(0) 推荐(0) 编辑
摘要:新建索引delta_notification_2023.02.28 PUT delta_notification_2023.02.28 { "mappings" : { "properties" : { "alarmContent" : { "type" : "text", "fields" : { 阅读全文
posted @ 2023-02-28 16:32 SpecialSpeculator 阅读(19) 评论(0) 推荐(0) 编辑
摘要:1.获取ES的模板(模板名称delta-alarm) GET _template/delta-alarm { "delta-alarm" : { "order" : 0, "index_patterns" : [ "delta-alarm*" ], "settings" : { "index" : 阅读全文
posted @ 2023-02-27 16:21 SpecialSpeculator 阅读(512) 评论(0) 推荐(0) 编辑
摘要:Filter性能更高 filter不进行评分操作,所以性能更好 Must 好计算分值的,类似于sql中的and 阅读全文
posted @ 2022-04-22 18:10 SpecialSpeculator 阅读(850) 评论(0) 推荐(1) 编辑
摘要:1.查询json学习 { "bool": { "must": [ { "term": { "yn": { "value": 1, "boost": 1 # 权重是1 } } }, { "terms": { "ware_info_id": [ "lw_770_421", "lw_770_979", " 阅读全文
posted @ 2022-04-22 13:35 SpecialSpeculator 阅读(34) 评论(0) 推荐(0) 编辑
摘要:1.三级部门分应用统计PXX逻辑 { "query": { "bool": { "must": [ { "term": { "child3DepartmentId": "00065308" } }, { "terms": { "serverUseType": [ "1", "3" ] } }, { 阅读全文
posted @ 2021-03-11 18:03 SpecialSpeculator 阅读(178) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示