elasticsearch - 如何查找弹性搜索查询的执行时间
问题描述
我正在使用弹性搜索从 Rails 应用程序中获得快速结果。我想知道执行特定查询需要多少时间?是否有任何工具可以让我找到并比较执行时间以便优化查询?
解决方案
响应对象中的 'took' 属性是以毫秒为单位的执行时间。例如:
{
"took" : 17,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
推荐阅读
- powershell - Powershell Start-Process 文件名或扩展名太长
- json - 从两个相互依赖的 JSON 获取响应会产生错误 [React Hooks]
- javascript - 您的应用程序正在崩溃。等待文件更改
- javascript - 使用套接字将字符串从 Javascript 发送到 Python 代码
- r - 将数据框和数据框列表组合成一维数据框列表,R
- latex - 在将乳胶输入 Wolfram 时,我能否像在 Symbolab 中一样查看实时变化的方程?
- python - 如何使用python链接word文档中的内容控制框
- firebase-cloud-messaging - 我可以使用 fcm 在 web 中推送资产版本吗
- firebase - Azure devops 将 iOS 应用程序部署到 Firebase 应用程序分发
- java - 在 Java 中创建表后创建 DynamoDB 全局二级索引