elasticsearch - Esrally 在同一个 track.json 中提供多个搜索查询
问题描述
我们可以在同一个 track.json 中给出多个搜索查询吗?我想给出下面给出的 2 个查询/所以我以不同的方式在几个地方添加了它来组织它。但是,当我验证 .json 时,我得到操作键重复或 json 无效。谢谢你。
解决方案
是的,请参考https://esrally.readthedocs.io/en/stable/track.html#schedule 还有https://discuss.elastic.co/t/esrally-giving-multiple-search-queries-in-the-same -track-json/279184/2
解决方案将是
{
"version": 2,
"description": "Tutorial benchmark for Rally Search",
"indices": [
{
"name": "customrecords",
"types": [
"docs"
]
}
],
"schedule": [
{
"operation": {
"operation-type": "cluster-health",
"request-params": {
"wait_for_status": "green"
}
}
},
{
"operation": {
"name": "term-search",
"operation-type": "search",
"body": {
"query": {
"term": {
"body": "Lago"
}
}
}
},
"clients": 4,
"warmup-iterations": 1000,
"iterations": 6000,
"target-throughput": 100
},
{
"operation": {
"name": "match-all-query",
"operation-type": "search",
"body": {
"query": {
"match_all": {}
}
}
},
"clients": 4,
"warmup-iterations": 1000,
"iterations": 6000,
"target-throughput": 100
}
]
}
推荐阅读
- php - 如何不选择多对一关系中的字段
- algorithm - 如何模拟圆与线段末端之间的碰撞
- c++ - OpenGL项目崩溃
- pandas - 为什么nunique会覆盖pandas中的分组列
- elasticsearch - 基于 100 加权的 Elasticsearch 随机选择
- c# - 为什么 WebClient.DownloadData 有时会降低图像的分辨率?
- python - 如何通过pywinauto检查一个窗口或对话框是否显示
- react-native - 如何使用 React Navigation 在 TabNavigator 内制作嵌套 StackNavigator
- java - 有没有一种有效的方法可以将多个 HTML 字符串写入 Java 中的 PDF 文档?
- flutter - Provider 中是否有任何属性明智的 notifyListerners 选项?