- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
问题。我的任务是研究如何在 Elasticsearch 中回填数据。到目前为止有点空。基本要点是:
注意:所有文档都存储在每日索引下,每天约有 20 万个文档。
我正在查看带有批量助手的 Python API 文档: http://elasticsearch-py.readthedocs.io/en/master/helpers.html
但我想知道这是否可能。
我的想法是使用:批量助手拉动滚动 ID(批量更新?),遍历每个文档 ID,从每个停靠栏的两个字段中拉取数据,进行数学计算,并使用新的字段数据完成更新请求。
有人做过吗?也许是带有 groovy 脚本的东西?
谢谢!
最佳答案
Bulk helpers to pull a scroll ID (bulk _update?), iterate over each doc id, pull that data in from the two fields for each dock, do the math, and finish the update request with the new field data.
基本上,是的:
/_search?scroll
获取文档/_bulk
更新请求其他选项是:
/_reindex
API /_update_by_query
API 两者都支持脚本,如果我理解正确的话,这将是完美的选择,因为您的更新不依赖于外部因素,所以这也可以直接在服务器内完成。
关于python - Elasticsearch计算后将两个字段回填到一个新字段中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41127194/
设置 考虑 df = pd.DataFrame(index=pd.date_range('2016-03-01', '2016-03-08'), columns=list('ABC')) df.ilo
我经常遇到必须从另一个数据源“填写”信息的情况。 例如: x 2 b y 3 c x 4 d w 5 e v 6 f u 7 g t 8
所以这是场景: 我们有一个 m_reading 表,每天都会在其中提取 24 个读数。 在 24 个读数中,23 个是当天的读数,1 个是前一天的读数。 物化 View 应该聚合天数数据。 业务用户可
假设您有一个 Airflow DAG,回填没有意义,这意味着,在它运行一次之后,再快速运行它之后的时间将完全没有意义。 例如,如果您从某个仅每小时更新一次的来源将数据加载到数据库中,那么快速连续发生的
我有一个如下所示的 DAG,dagrun_timeout 设置为 4 小时。当我转到 UI 并清除从 start_date 到 present 的所有任务时,所有 DAG 都设置为运行状态。 4 小时
我的第一篇文章。我在 Google Analytics(分析)中的目标漏斗中遇到了大问题。 我们设置了一个漏斗来跟踪从我们的主要公司网站到在第三方网站上处理的用户注册的注册(使用虚拟网页浏览来跟踪用户
试图找出一种方法来回填 ds 分区 Hive 表的分区。 我知道如何从 CLI 运行 Hive 命令,例如 $HIVE_HOME/bin/hive -e 'select a.col from tab1
https://cloud.google.com/bigquery/docs/reference/datatransfer/rest/ 我正在寻找“bigquery 数据传输服务”的 php 客户端库
我是一名优秀的程序员,十分优秀!