摘要: 最近项目上有个需求,就是把一批用户申请表(pdf文件)的内容,写入数据库。由于文件数量较大,需要批量处理。 本来以为很简单的事情,结果却因为pdf文件内容格式问题导致部分内容读不到: 读出内容:First Name (*) 具体的,这种pdf文件是一种表格,需要用户自己填入表格中的一些内容,比如用户 阅读全文
posted @ 2021-04-13 10:33 LeoGIS 阅读(792) 评论(0) 推荐(0) 编辑
摘要: 今天有个同事说怀疑某个索引的一个字段是否有定义,因为查询结果中一直没有该字段。 我们可以使用exists来查询那些在特定字段有值的文档。 比如: ec2-user@ip-172-31-31-122:~> curl -H "Content-Type: application/json" -XGET ' 阅读全文
posted @ 2021-04-03 19:33 LeoGIS 阅读(2049) 评论(0) 推荐(0) 编辑
摘要: 代码如下: date = datetime.datetime.strptime("2020-01-01", format="%Y-%m-%d").date() 运行报错: TypeError: strptime() takes no keyword arguments 查看strptime的声明: 阅读全文
posted @ 2021-03-17 09:26 LeoGIS 阅读(2177) 评论(0) 推荐(0) 编辑
摘要: see https://www.cnblogs.com/bonelee/p/9882287.html 过滤 使用 [] 过滤 []中是一个boolean 表达式,凡是计算为 True 的行就会被选取。 df[df.A>1] 阅读全文
posted @ 2021-02-27 22:14 LeoGIS 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 有个索引字段命名为id,现在领导怀疑该字段的唯一性,需要验证下这个问题。 该字段的定义为: "id": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, 对应的验证语句为: 阅读全文
posted @ 2021-02-27 20:02 LeoGIS 阅读(856) 评论(0) 推荐(0) 编辑
摘要: 网上资料说配置文件为/etc/elasticsearch/jvm.options,但是发现无效,可以找下elasticsearch下的config/jvm.options 阅读全文
posted @ 2021-02-27 16:23 LeoGIS 阅读(1120) 评论(0) 推荐(0) 编辑
摘要: see https://blog.csdn.net/gfzdgd/article/details/104678975 key point: Ubuntu下图形登录后非图形登录的配置文件是不同的,/etc/security/limits.conf 只是在非图形登录情况下有效。 图形登录情况下需要修改: 阅读全文
posted @ 2021-02-27 15:54 LeoGIS 阅读(520) 评论(0) 推荐(0) 编辑
摘要: see https://www.cnpython.com/qa/221588 key point: run('docker ps -a | grep {} | awk "{print $1}"'.format(container_name)) KeyError: 'print $1'solution 阅读全文
posted @ 2021-02-20 14:56 LeoGIS 阅读(921) 评论(0) 推荐(0) 编辑
摘要: see https://www.cnblogs.com/kai-/p/13457800.html key point: RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements 阅读全文
posted @ 2021-02-20 14:51 LeoGIS 阅读(571) 评论(0) 推荐(0) 编辑
摘要: use logger.exception while not logger.error 阅读全文
posted @ 2021-02-12 21:19 LeoGIS 阅读(145) 评论(0) 推荐(0) 编辑