<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Profile API Profile API提供了在搜索請求中執行單個組件的詳細時間信息。它讓用戶了解在底層如何執行搜索請求,這樣用戶可以理解為什么某些請求是緩慢的,并采取措施改善他們。 Profile API的輸出**非常**詳細,特別是對于跨多個分片的復雜請求執行。推薦使用pretty打印響應信息,這樣有助于理解輸出結果。 ## 用法/Usage 任意*_search*請求可以通過添加一個頂級*profile*參數來實現概要描述。 | `curl -XGET?``'localhost:9200/_search?pretty'`?`-H?``'Content-Type: application/json'`?`-d'` `{` `"profile"``:?``true``,?(``1``)` `"query"`?`: {` `"match"`?`: {?``"message"`?`:?``"message number"`?`}` `}` `}` `'` | (1)?設置頂級profile參數為true,開啟搜索概要描述 這將產生以下結果: | `{` `"took"``:?``25``,` `"timed_out"``:?``false``,` `"_shards"``: {` `"total"``:?``1``,` `"successful"``:?``1``,` `"failed"``:?``0` `},` `"hits"``: {` `"total"``:?``4``,` `"max_score"``:?``0.5093388``,` `"hits"``: [...]` `},` `"profile"``: {` `"shards"``: [` `{` `"id"``:?``"[2aE02wS1R8q_QFnYu6vDVQ][twitter][1]"``,` `"searches"``: [` `{` `"query"``: [` `{` `"type"``:?``"BooleanQuery"``,` `"description"``:?``"message:message message:number"``,` `"time"``:?``"1.873811000ms"``,` `"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` `},` `"children"``: [` `{` `"type"``:?``"TermQuery"``,` `"description"``:?``"message:message"``,` `"time"``:?``"0.3919430000ms"``,` `"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` `}` `},` `{` `"type"``:?``"TermQuery"``,` `"description"``:?``"message:number"``,` `"time"``:?``"0.2106820000ms"``,` `"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` `}` `}` `]` `}` `],` `"rewrite_time"``:?``51443``,` `"collector"``: [` `{` `"name"``:?``"CancellableCollector"``,` `"reason"``:?``"search_cancelled"``,` `"time"``:?``"0.3043110000ms"``,` `"time_in_nanos"``:?``"304311"``,` `"children"``: [` `{` `"name"``:?``"SimpleTopScoreDocCollector"``,` `"reason"``:?``"search_top_hits"``,` `"time"``:?``"0.03227300000ms"``,` `"time_in_nanos"``:?``"32273"` `}` `]` `}` `]` `}` `],` `"aggregations"``: []` `}` `]` `}` `}` | (1)返回的搜索結果,為簡便起見,這里省略 ? 即使對于一個簡單的查詢,響應過程也是相對復雜的。在深入更復雜的例子之前,讓我們先全面剖析它。 ? 首先,profile響應的整體結構如下: ? | `{` `"profile"``: {` `"shards"``: [` `{` `"id"``:?``"[2aE02wS1R8q_QFnYu6vDVQ][twitter][1]"``,? (``1``)` `"searches"``: [` `{` `"query"``: [...],?????????? (``2``)` `"rewrite_time"``:?``51443``,??? (``3``)??????????????????` `"collector"``: [...]??????? (``4``)` `}` `],` `"aggregations"``: [...]?????????????????????? (``5``)` `}` `]` `}` `}` | ? | (1)profile返回參與響應的每一個分片,這些分片由唯一ID標識 | | (2)每個概要都包含關于查詢執行的詳細信息部分 | | (3)每個概要都有一個單獨的rewrite_time累計時間。 | | (4)每個概要還包含關于運行搜索的lucene Collector部分 | | (5)每個概要都包含有關聚合執行的詳細信息部分 | ? 因為一個搜索請求可能在一個或多個索引分片上執行,并且搜索范圍覆蓋一個或多個索引,profile的響應中頂層元素是一個shard對象數組。每個分片對象列表都列出唯一標識分片的id。ID的格式是[nodeID][indexName][shardID] ? profile本身可能包含一個或多個"searches"字段,其中每個搜索search是針對底層Lucene索引執行的查詢。用戶提交的大多數搜索請求只會執行對Lucene索引的一個search。但偶爾也會執行多個搜索searches,如包括全局聚合(這需要執行第二個“match_all”查詢全局上下文)。 ? ? 在每個搜索對象里,會有兩個概要信息的數組:query?數組和collector?數組。與搜索對象并肩的是一個聚合aggregations?對象,它包含聚合的概要信息。在未來,可以添加更多的部分,如建議?suggest,高亮highlight等。 ? 這也會有一個rewrite?度量顯示重寫查詢的總時間 (以納秒為單位)。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看