<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] ## **概念** 現在我們的節點(和集群)已經啟動并運行,下一步是了解如何與之通信。幸運的是,Elasticsearch提供了非常全面而強大的REST API,您可以使用它與集群進行交互。該API可以完成的幾件事如下: * 檢查您的群集,節點和索引的運行狀況,狀態和統計信息 * 管理您的集群,節點以及索引數據和元數據 * 對您的索引執行CRUD(創建,讀取,更新和刪除)和搜索操作 * 執行高級搜索操作,例如分頁,排序,過濾,腳本,聚合以及許多其他操作 ## **集群健康-Cluster health** ``` GET _cat/health 響應:1572721808 03:10:08 diting-es yellow 1 1 6 6 0 0 5 0 - 54.5% ``` 每當我們要求集群運行狀況時,我們都會顯示綠色,黃色或紅色。 * 綠色-一切都很好(集群功能齊全) * 黃色-所有數據均可用,但某些副本尚未分配(集群功能齊全) * 紅色-由于某些原因,某些數據不可用(集群部分起作用) 節點的列表: ``` GET _cat/nodes 響應:127.0.0.1 29 67 7 mdi * parallel-1 ``` ## **所有指數** ``` GET _cat/indices 響應: green open .kibana T5NtJCD7TuqpzkiZ-qDUCg 1 0 2 0 9.9kb 9.9kb yellow open orders 6VoKl9kDQFWSp5K3yxFtww 5 1 30 0 149.9kb 149.9kb ``` ## **創建索引** ``` PUT /customer?pretty //創建索引 GET /_cat/indices //獲取所有索引 ``` ## **索引和查詢文檔** ### **添加索引** ``` PUT /customer/_doc/1?pretty { "name": "John Doe" } ``` 響應 ``` { "_index": "customer", "_type": "_doc", "_id": "1", "_version": 1, "result": "created", "_shards": { "total": 2, "successful": 1, "failed": 0 }, "_seq_no": 0, "_primary_term": 1 } ``` ### 查詢 ``` GET /customer/_doc/1 ``` ### 響應 { "\_index": "customer", "\_type": "\_doc", "\_id": "1", "\_version": 1, "found": true, "\_source": { ``` "name": "John Doe" ``` } } ## 刪除索引 ``` DELETE /customer 即 /{inexName} GET /_cat/indices ```
                  <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>

                              哎呀哎呀视频在线观看