zoukankan      html  css  js  c++  java
  • (九)Delete an Index

    Now let’s delete the index that we just created and then list all the indexes again:

    现在让我们删除刚刚创建的索引,然后再次列出所有索引:

    curl -X DELETE "localhost:9200/customer?pretty"
    curl -X GET "localhost:9200/_cat/indices?v"

    And the response:

    health status index uuid pri rep docs.count docs.deleted store.size pri.store.size

    Which means that the index was deleted successfully and we are now back to where we started with nothing in our cluster.

    这意味着索引已成功删除,我们现在回到我们在集群中没有任何内容的地方。
     
    Before we move on, let’s take a closer look again at some of the API commands that we have learned so far:
    在我们继续之前,让我们再仔细看看到目前为止我们学到的一些API命令:
    curl -X PUT "localhost:9200/customer"
    curl -X PUT "localhost:9200/customer/_doc/1" -H 'Content-Type: application/json' -d'
    {
      "name": "John Doe"
    }
    '
    curl -X GET "localhost:9200/customer/_doc/1"
    curl -X DELETE "localhost:9200/customer"

    If we study the above commands carefully, we can actually see a pattern of how we access data in Elasticsearch. That pattern can be summarized as follows:

    如果我们仔细研究上述命令,我们实际上可以看到我们如何在Elasticsearch中访问数据的模式。该模式可归纳如下:
    <REST Verb> /<Index>/<Type>/<ID>
    <url>/<Index>/<Type>/<Id>

    This REST access pattern is so pervasive throughout all the API commands that if you can simply remember it, you will have a good head start at mastering Elasticsearch.

    这种REST访问模式在所有API命令中都非常普遍,如果你能记住它,你将在掌握Elasticsearch方面有一个良好的开端。
     
  • 相关阅读:
    protobuf lib库的使用
    protobuf的下载、编译和使用
    使用python和pygame绘制繁花曲线
    经典方块游戏-俄罗斯方块
    经典方块游戏-贪吃蛇
    经典方块游戏-基础
    经典方块游戏一
    Python脚本管理
    SublimeText3设置显示空格及Tab显示为4个空格
    域名解析记录类型
  • 原文地址:https://www.cnblogs.com/shuaiandjun/p/10272009.html
Copyright © 2011-2022 走看看