摘要: for循环,一个key在一个map中,则一直迭代 for _, ok := mapping[key]; ok; _, ok = mapping[key]{ // do something } go总是使用值传递,但是有些数据类型是引用类型,比如map, pointer, channel, slice 阅读全文
posted @ 2022-06-30 13:06 Go_Forward 阅读(28) 评论(0) 推荐(0) 编辑
摘要: match, match_phrase, match_phrase_prefix 三个都会对查询词和文本进行分词后进行查询 match只要查询词分词结果和源数据分词结果匹配,就可以命中 match_phrase需要查询词分词和源数据分词顺序一致,切默认两者相邻 match_phrase_prefix 阅读全文
posted @ 2022-06-10 18:41 Go_Forward 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 环境 python 版本3.6.4 gevent 1.5.0 gunicorn 20.1.0 错误 RecursionError: maximum recursion depth exceeded while calling a Python object 错误原因 根据错误栈,出问题的代码在pyt 阅读全文
posted @ 2022-05-12 22:56 Go_Forward 阅读(1489) 评论(0) 推荐(1) 编辑
摘要: 多表join的sql EXPLAIN SELECT employee.name, department.name, project.name FROM employee left join department on employee.department_id = department.id le 阅读全文
posted @ 2022-04-07 15:44 Go_Forward 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 建一个索引的步骤 1:先创建轮滚策略 2:创建模板 3:创建索引 创建轮滚策略 PUT _ilm/policy/this_is_an_index_policy { "policy" : { "phases" : { "hot" : { "min_age" : "0ms", "actions" : { 阅读全文
posted @ 2021-12-18 17:30 Go_Forward 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Python中一切皆对象,类也是对象,元类就是创建类的类 阅读全文
posted @ 2021-11-12 15:59 Go_Forward 阅读(834) 评论(0) 推荐(0) 编辑
摘要: https://www.zhihu.com/question/20917614 http://www.bjhee.com/mission-control.html 窗口切换 https://sspai.com/post/43611 阅读全文
posted @ 2021-08-18 12:35 Go_Forward 阅读(57) 评论(0) 推荐(0) 编辑
摘要: es补零 GET /cars/transactions/_search { "size" : 0, "aggs": { "sales": { "date_histogram": { "field": "sold", "interval": "month", "format": "yyyy-MM-dd 阅读全文
posted @ 2021-07-27 17:43 Go_Forward 阅读(450) 评论(0) 推荐(1) 编辑
摘要: 获取stats from pymongo import MongoClient client = MongoClient() db = client.test # print collection statistics print db.command("collstats", "events") 阅读全文
posted @ 2021-07-07 16:24 Go_Forward 阅读(17) 评论(0) 推荐(0) 编辑
摘要: url到view function之间的一个中间概念,默认是view function的名字,相比于直接使用view function, 使用end point 提供了一个命名空间,可以让不同蓝图的view function有相同名称的view function https://stackoverf 阅读全文
posted @ 2021-06-20 15:49 Go_Forward 阅读(137) 评论(0) 推荐(0) 编辑