15.profile-api
生活随笔
收集整理的這篇文章主要介紹了
15.profile-api
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
文章目錄
- Profile API 簡介
Profile API 簡介
Profile API提供了有關(guān)搜索請求中各個組件的執(zhí)行的詳細時序信息。它使用戶可以洞悉搜索請求是如何在低級執(zhí)行的,從而使用戶可以了解為什么某些請求很慢的原因,并采取措施加以改進。請注意,Profile API,不統(tǒng)計網(wǎng)絡(luò)延遲,搜索獲取階段所花費的時間,請求花費在隊列中或在協(xié)調(diào)節(jié)點上合并分片響應(yīng)所花費的時間。
Profile API的輸出非常冗長,尤其是對于在許多分片上執(zhí)行的復(fù)雜請求而言。建議打印漂亮的響應(yīng),以幫助理解輸出
GET /twitter/_search {"profile": true,"query" : {"match" : { "message" : "some number" }} }返回
{"took": 25,"timed_out": false,"_shards": {"total": 1,"successful": 1,"skipped" : 0,"failed": 0},"hits": {"total" : {"value": 4,"relation": "eq"},"max_score": 0.5093388,"hits": [...] },"profile": {"shards": [{"id": "[2aE02wS1R8q_QFnYu6vDVQ][twitter][0]","searches": [{"query": [{"type": "BooleanQuery","description": "message:some message:number","time_in_nanos": "1873811","breakdown": {"score": 51306,"score_count": 4,"build_scorer": 2935582,"build_scorer_count": 1,"match": 0,"match_count": 0,"create_weight": 919297,"create_weight_count": 1,"next_doc": 53876,"next_doc_count": 5,"advance": 0,"advance_count": 0,"compute_max_score": 0,"compute_max_score_count": 0,"shallow_advance": 0,"shallow_advance_count": 0,"set_min_competitive_score": 0,"set_min_competitive_score_count": 0},"children": [{"type": "TermQuery","description": "message:some","time_in_nanos": "391943","breakdown": {"score": 28776,"score_count": 4,"build_scorer": 784451,"build_scorer_count": 1,"match": 0,"match_count": 0,"create_weight": 1669564,"create_weight_count": 1,"next_doc": 10111,"next_doc_count": 5,"advance": 0,"advance_count": 0,"compute_max_score": 0,"compute_max_score_count": 0,"shallow_advance": 0,"shallow_advance_count": 0,"set_min_competitive_score": 0,"set_min_competitive_score_count": 0}},{"type": "TermQuery","description": "message:number","time_in_nanos": "210682","breakdown": {"score": 4552,"score_count": 4,"build_scorer": 42602,"build_scorer_count": 1,"match": 0,"match_count": 0,"create_weight": 89323,"create_weight_count": 1,"next_doc": 2852,"next_doc_count": 5,"advance": 0,"advance_count": 0,"compute_max_score": 0,"compute_max_score_count": 0,"shallow_advance": 0,"shallow_advance_count": 0,"set_min_competitive_score": 0,"set_min_competitive_score_count": 0}}]}],"rewrite_time": 51443,"collector": [{"name": "CancellableCollector","reason": "search_cancelled","time_in_nanos": "304311","children": [{"name": "SimpleTopScoreDocCollector","reason": "search_top_hits","time_in_nanos": "32273"}]}]}],"aggregations": []}]} }具體的實例分析后面補充
超強干貨來襲 云風(fēng)專訪:近40年碼齡,通宵達旦的技術(shù)人生總結(jié)
以上是生活随笔為你收集整理的15.profile-api的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 14.count-api
- 下一篇: 16.validate_api