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

                本篇記錄的全部是索引的相關操作 ### **新增** ### 命令:`curl -X PUT "http://10.10.16.180:9200/nba" | json_pp` ### 結果: ### ``` gold@1498775ba8fe ~ % curl -X PUT "http://10.10.16.180:9200/nba" | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 62 100 62 0 0 103 0 --:--:-- --:--:-- --:--:-- 104 { "acknowledged" : true, "index" : "nba", "shards_acknowledged" : true } ``` ### **獲取** ### 命令:`curl -X GET "http://10.10.16.180:9200/nba" | json_pp` ### 結果: ### ``` gold@1498775ba8fe ~ % curl -X GET "http://10.10.16.180:9200/nba" | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 225 100 225 0 0 9083 0 --:--:-- --:--:-- --:--:-- 12500 { "nba" : { "aliases" : {}, "mappings" : {}, "settings" : { "index" : { "creation_date" : "1694227082539", "number_of_replicas" : "1", "number_of_shards" : "1", "provided_name" : "nba", "uuid" : "8CLIFy9eS2qZcm-k3kFBpg", "version" : { "created" : "7020099" } } } } } ``` ### **刪除** ### 命令:`curl -X DELETE "http://10.10.16.180:9200/nba" | json_pp` ### 結果: ``` gold@1498775ba8fe ~ % curl -X DELETE "http://10.10.16.180:9200/nba" | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 21 100 21 0 0 153 0 --:--:-- --:--:-- --:--:-- 160 { "acknowledged" : true } ``` ### **批量獲取** ### 命令:`curl -X GET "http://10.10.16.180:9200/nba,cba" | json_pp` ### 結果: ``` gold@1498775ba8fe ~ % curl -X GET "http://10.10.16.180:9200/nba,cba" | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 449 100 449 0 0 19445 0 --:--:-- --:--:-- --:--:-- 26411 { "cba" : { "aliases" : {}, "mappings" : {}, "settings" : { "index" : { "creation_date" : "1694227737478", "number_of_replicas" : "1", "number_of_shards" : "1", "provided_name" : "cba", "uuid" : "Nhv8vckSSSKR7LcenSPVDA", "version" : { "created" : "7020099" } } } }, "nba" : { "aliases" : {}, "mappings" : {}, "settings" : { "index" : { "creation_date" : "1694227698390", "number_of_replicas" : "1", "number_of_shards" : "1", "provided_name" : "nba", "uuid" : "M6rRM4xFST64Nl24x51ZQg", "version" : { "created" : "7020099" } } } } } ``` ### **獲取所有** ### 命令:`curl -X GET "http://10.10.16.180:9200/_all" | json_pp` ### 結果: ``` gold@1498775ba8fe ~ % curl -X GET "http://10.10.16.180:9200/_all" | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 449 100 449 0 0 18398 0 --:--:-- --:--:-- --:--:-- 24944 { "cba" : { "aliases" : {}, "mappings" : {}, "settings" : { "index" : { "creation_date" : "1694227737478", "number_of_replicas" : "1", "number_of_shards" : "1", "provided_name" : "cba", "uuid" : "Nhv8vckSSSKR7LcenSPVDA", "version" : { "created" : "7020099" } } } }, "nba" : { "aliases" : {}, "mappings" : {}, "settings" : { "index" : { "creation_date" : "1694227698390", "number_of_replicas" : "1", "number_of_shards" : "1", "provided_name" : "nba", "uuid" : "M6rRM4xFST64Nl24x51ZQg", "version" : { "created" : "7020099" } } } } } ``` ### **獲取es節點情況** ### 命令:`curl -X GET "http://10.10.16.180:9200/_cat/indices?v"` ### 結果: ``` gold@1498775ba8fe ~ % curl -X GET "http://10.10.16.180:9200/_cat/indices?v" health status index uuid pri rep docs.count docs.deleted store.size pri.store.size yellow open nba M6rRM4xFST64Nl24x51ZQg 1 1 0 0 230b 230b yellow open cba Nhv8vckSSSKR7LcenSPVDA 1 1 0 0 230b 230b ``` ### 返回的參數具體含義如下: > * `health`: 索引的健康狀態,可以是以下幾種狀態之一: > * `green`: 所有主分片和副本分片都正常。 > * `yellow`: 所有主分片都正常,但是至少有一個副本分片丟失。 > * `red`: 至少有一個主分片丟失,索引無法正常工作。 > * `status`: 索引的狀態,通常為`open`,表示索引是打開的并可用。 > * `index`: 索引的名稱。 > * `uuid`: 索引的唯一標識符。 > * `pri`: 索引的主分片數量。 > * `rep`: 索引的副本分片數量。 > * `docs.count`: 索引中的文檔數量。 > * `docs.deleted`: 被標記為刪除的文檔數量。 > * `store.size`: 索引在磁盤上的總存儲大小。 > * `pri.store.size`: 主分片在磁盤上的存儲大小。 > > 在給定的結果中,有兩個索引被列出:`nba`和`cba`。它們都處于黃色狀態,意味著它們的主分片和副本分片數量均為1,并且當前沒有文檔。存儲大小為230字節,主分片的存儲大小也是230字節。 ### 判斷索引是否存在 ### 命令:`curl -I "http://10.10.16.180:9200/nba" ` ### 結果: ``` gold@1498775ba8fe ~ % curl -I "http://10.10.16.180:9200/nba" HTTP/1.1 200 OK content-type: application/json; charset=UTF-8 content-length: 225 ``` ### **關閉** ### 命令:`curl -X POST "http://10.10.16.180:9200/nba/_close" | json_pp` ### 結果: ``` gold@1498775ba8fe ~ % curl -X POST "http://10.10.16.180:9200/nba/_close" | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 48 100 48 0 0 180 0 --:--:-- --:--:-- --:--:-- 184 { "acknowledged" : true, "shards_acknowledged" : true } ``` ### **打開** ### 命令:`curl -X POST "http://10.10.16.180:9200/nba/_open" | json_pp` ### 結果: ``` gold@1498775ba8fe ~ % curl -X POST "http://10.10.16.180:9200/nba/_open" | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 48 100 48 0 0 111 0 --:--:-- --:--:-- --:--:-- 113 { "acknowledged" : true, "shards_acknowledged" : true } ``` ###
                  <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>

                              哎呀哎呀视频在线观看