elasticsearch - 带有聚合的 Elasticsearch 转换未显示所有结果?也尝试过 size 属性
问题描述
嗨,我正在尝试在其他索引中找到匹配的文档...我在弹性云门户中找到了以下示例...我得到了预期的结果,但问题是结果未显示超过 100它工作的地方
POST /_transform/_preview?pretty
{
"id": "index_compare",
"source": {
"index": [
"pvrmreporesult"
]
},
"dest": {
"index": [
"new_literature"
],
"query": {
"bool": {
"filter": [
{ "term": { "compunitid.keyword": "XYZ" }},
{ "range": { "indexeddate": {
"lte": "2020-11-29T00:00:00" }}}
]
}
}
},
"pivot": {
"group_by": {
"unique-id": {
"terms": {
"field": "title.keyword"
}
}
},
"aggregations": {
"compare": {
"scripted_metric": {
"map_script": "state.doc = new HashMap(params['_source'])",
"combine_script": "return state",
"reduce_script": """
if (states.size() != 2) {
return "count_mismatch"
}
return "match"
"""
}
}
}
},
"settings": {
"max_page_search_size": 5000
}
}
试图根据字段标题查找 pvrmreporesult 和 new_literature 中常见的文档..
解决方案
推荐阅读
- c++ - `std::initializer_list 上的`static_assert`
::size` 在函数中 - java - InvalidTypeException:类型类 java.util.ArrayList 的值 0 不对应于任何 CQL3 类型
- c# - 移动到旋转方向 [2D] [Unity]
- php - 带有 php 的 youtube 视频下载器
- android - 当Android应用程序处于后台/关闭时未调用onNotification
- javascript - 仅在先前获取成功后使用 useEffect / useState 设置异步数据获取超时的正确方法
- java - 在 IntelliJ 和 geany 中运行项目有区别吗?
- android - 实施华为移动服务
- d3.js - dc.js 系列图表 - 填充缺失数据时图表太慢
- javascript - 一次通过 JS 发送表单和常规 POST