随笔分类 -  Elastic

摘要:def es_mapping2dict(mapping): mapping_dict = dict() if isinstance(mapping, dict): if "properties" in mapping: for k, v in mapping.get("properties").it 阅读全文
posted @ 2023-04-08 01:30 NAVYSUMMER 阅读(15) 评论(0) 推荐(0)
摘要:def es_mapping2dict(mapping): mapping_dict = dict() if isinstance(mapping, dict): if "properties" in mapping: for k, v in mapping.get("properties").it 阅读全文
posted @ 2023-04-07 23:18 NAVYSUMMER 阅读(11) 评论(0) 推荐(0)
摘要:def convert_query(query): """ Convert Elasticsearch query to use keyword and text fields appropriately """ if isinstance(query, dict): for key, value 阅读全文
posted @ 2023-04-07 23:13 NAVYSUMMER 阅读(104) 评论(0) 推荐(0)
摘要:1.日志格式: [2018-11-24 08:33:43,253][ERROR][http-nio-8080-exec-4][com.hh.test.logs.LogsApplication][code:200,msg:测试录入错误日志,param:{}] 处理: filter { if "nova 阅读全文
posted @ 2022-11-20 19:30 NAVYSUMMER 阅读(102) 评论(0) 推荐(0)
摘要:POST 索引/_update_by_query { "script": "ctx._source.remove('{字段名}')", "query": { "bool": { "must": [ { "exists": { "field": "字段名" } } ] } } } 阅读全文
posted @ 2022-11-19 19:06 NAVYSUMMER 阅读(758) 评论(0) 推荐(0)
摘要:1.备份数据 POST _reindex?wait_for_completion=false&scroll=10m { "source": { "index": "数据索引", "size": 10000 }, "dest": { "index": "备份索引" } } 2.查看任务 GET _ta 阅读全文
posted @ 2022-11-16 11:15 NAVYSUMMER 阅读(218) 评论(0) 推荐(0)
摘要:# 根据索引和条件查找 GET lc_auth_user/_search { "query": { "bool": { "must": [ {"term": { "username.keyword": { "value": "admin" } }}, { "term": { "client_id.k 阅读全文
posted @ 2022-06-25 00:19 NAVYSUMMER 阅读(89) 评论(0) 推荐(0)
摘要:1.添加elasticsearch源 vim /etc/yum.repos.d/elasticsearch.repo [elasticsearch-7.x] name=Elasticsearch repository for 7.x packages baseurl=https://artifact 阅读全文
posted @ 2022-05-13 21:14 NAVYSUMMER 阅读(139) 评论(0) 推荐(0)

交流群 编程书籍