会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小酥肉
首页
新随笔
管理
2022年12月8日
go 不保存文件下载
摘要: xlsxNews := excelize.NewFile()xlsxNews.SetSheetRow("sheet1", "A1", &[]interface{}{ "publishDate", "newsId", "title"}, )r.Response.Header().Set("Conten
阅读全文
posted @ 2022-12-08 18:21 小酥肉是我
阅读(27)
评论(0)
推荐(0)
2022年2月16日
正则匹配日期
摘要: (\d+[-/]\d+[-/]\d+)|\d+[-|年|/][\d+][-|月|/]\d+[月|日]|\d+[^年]+年可匹配类型:2021年01月31日2021-01-312021/01/312021年2021年1-6月
阅读全文
posted @ 2022-02-16 09:53 小酥肉是我
阅读(181)
评论(0)
推荐(0)
2021年11月16日
es nested嵌套查询
摘要: { "_source": [ "DATE", "NEWS_ID", "COMPSCORELIST" ], "query": { "bool": { "must": [ { "range": { "DATE": { "from": "2021-09-25T00:00:00+08:00", "inclu
阅读全文
posted @ 2021-11-16 10:05 小酥肉是我
阅读(1075)
评论(0)
推荐(0)
2021年11月13日
es nested结构判断不为空
摘要: { "query": { "nested": { "path": "COMPSCORELIST", "query": { "bool": { "must": { "exists": { "field": "COMPSCORELIST" } } } } } } }
阅读全文
posted @ 2021-11-13 16:17 小酥肉是我
阅读(942)
评论(0)
推荐(0)
2021年11月4日
在原有es结构基础上增加nested结构
摘要: PUT http://ip:port/esindex/_mapping { "properties": { "COMPSCORELIST": { "type": "nested", "properties": { "COMPNAME": { "type": "keyword" }, "SCORE":
阅读全文
posted @ 2021-11-04 11:30 小酥肉是我
阅读(488)
评论(0)
推荐(0)
2021年11月2日
es date_histogram嵌套aggterms查询示例
摘要: { "aggregations": { "groupDate": { "aggregations": { "riskTag": { "terms": { "field": "COMPANY_SECOND_RISK_TAGS", "include": "瑞幸咖啡\\(北京\\)有限公司.*", //
阅读全文
posted @ 2021-11-02 17:50 小酥肉是我
阅读(155)
评论(0)
推荐(0)
2020年9月10日
golang json解析
摘要: package main import ( "github.com/gin-gonic/gin" "github.com/gin-gonic/gin/binding" "github.com/go-playground/validator/v10" ) func TopicUrl(f1 valida
阅读全文
posted @ 2020-09-10 19:26 小酥肉是我
阅读(702)
评论(0)
推荐(0)
2020年7月23日
golang 请求接口
摘要: // 调用 func CallSearchFillingInfos(UA string,req *request.SearchDocRequest) response.SearchDocResponse { b, err := json.Marshal(req) FillingReq, _ := h
阅读全文
posted @ 2020-07-23 14:04 小酥肉是我
阅读(617)
评论(0)
推荐(0)
2020年7月15日
golang 使用github.com/scylladb/go-set/strset求交并集
摘要: A := strset.NewWithSize(0) A.Add("a","b","c","d") B := strset.NewWithSize(0) B.Add("a","d","e","c") unionSet :=strset.NewWithSize(0) //交集 intersection
阅读全文
posted @ 2020-07-15 14:36 小酥肉是我
阅读(380)
评论(0)
推荐(0)
2020年6月5日
golang 操作es 批量索引数据 Bulk
摘要: 减少开销 提高效率 现有130万条数据 一条一条索引的话需要不停的跑需要两天左右 如果使用bulk 五分钟就完事儿了 func IndexPrice() { es := tool.ES{ Index: "financials.us.gama", Type: "esstockprice", } var
阅读全文
posted @ 2020-06-05 11:53 小酥肉是我
阅读(3863)
评论(0)
推荐(1)
下一页
公告