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方面有一个良好的开端。
 

(九)Delete an Index的更多相关文章

  1. delete ELK index

    Go to tab “Dev Tools”4. On the left console type:GET _cat/indices?v&s=store.size:descand execute ...

  2. ElasticStack系列之十九 & bulk时 index 和 create 的区别

    区别: 两篇文章 id 都一样的情况下,index 是将第二篇文章覆盖第一篇:create 是在第二篇插入的时候抛出一个已经存在的异常 解释: 在批量请求的时候最好使用 create 方式进行导入.假 ...

  3. oracle delete all index own by table

    BEGIN FOR ind IN (SELECT index_name FROM user_indexes WHERE table_name = '') LOOP execute immediate ...

  4. 【MongoDB】The basic operation of Index in MongoDB

    In the past four blogs, we attached importance to the index, including description and comparison wi ...

  5. awk笔记1

    grep: 文本过滤器    grep 'pattern' input_file ... sed:流编辑器 awk: 报告生成器    格式化以后,显示 AWK a.k.a. Aho, Kernigh ...

  6. ocp11g培训内部教材_051课堂笔记(047)_SQL

    OCP 051课堂笔记 目录 OCP 051课堂笔记... 1 第一章.Oracle命令类别:... 4 第二章.SQL的基本函数... 4 2.1 单行函数与多行函数... 4 2.2 单行函数的几 ...

  7. 转 shell awk 使用详解

    awk简介 awk: 中文意思是报告生成器 能够根据我们输入的信息,将信息格式化以后显示,将定义好的信息以比较美观(直观)的方式显示出来出现比较早,继而出现了new awk(nawk)在windows ...

  8. 【转】 awk 学习笔记

    本文参考的是 ubuntu 下 gawk version 3.1.6 以及 <sed&awk> 一 . awk 简介 awk 是一种解释型(tawk除外)文本处理语言 二 . aw ...

  9. abap 常用 function

    ABAP常用函数总结  alv .smartform. excel .text.邮件 .远程访问,FTP服务器...  **********常用功能function REUSE_ALV_GRID_DI ...

随机推荐

  1. 浅析Javascript单例模式

    定义 保证一个类仅有一个实例,并提供一个访问它的全局访问点 .就想我们在开发中有些对象只需要一个,例如window对象. 1. 实现单例模式 var Singleton = function( nam ...

  2. Docker安装nginx

    直切正题: 一.安装nginx docker pull nginx 二.启动nginx容器 docker run --name mynginx -d -p : nginx 命令说明: -p 80:80 ...

  3. year 和 weak year 的区别

    java 中使用 SimpleDateFormat 时,会遇到 year 和 week year 这两个概念,特此记录. google 答案: A week year is in sync with ...

  4. 对HTML5标签的认识(二)

    ---恢复内容开始--- 这次随笔主要讲一下列表标签.链接标签.和表格标签.图像标签.音频标签.及视频标签的运用及作用. 一.<ul>和<ol> 首先先了解一下<ul&g ...

  5. 多线程(4)Task

    使用线程池使得创建线程已经很简单了,但是使用线程池不支持线程的取消,完成和失败通知等交互操作,为了解决这些问题,.net 4.0带来了TPL(Task Parallel Library)任务并行库,下 ...

  6. 面试题之(js实现当年剩余时间倒计时程序)

    js实现当年剩余时间倒计时程序,请看代码: <script> function counter() { var date = new Date(); var year = date.get ...

  7. 代码编辑器横评:为什么 VS Code 能拔得头筹

    摘要: 为什么 VS Code 这么火... 公众号:玩转 VS Code 原文:代码编辑器横评:为什么 VS Code 能拔得头筹 Fundebug经授权转载,版权归原作者所有. 2015 年 4 ...

  8. MySQL如何修改密码

    以下几种方法可供选择 第一种方式: 最简单的方法就是借助第三方工具Navicat for MySQL来修改,方法如下: 1.登录mysql到指定库,如:登录到test库. 2.然后点击上方“用户”按钮 ...

  9. 跨进程SharedPreferences异常。

    诡异的SharedPreferences异常,在ACC之后,SharedPreferences获取不到值了,但是另一个应用可以获取到值.同样的方法,一个正常一个异常. Context c = null ...

  10. canvas 时钟动画

    平时在公司不忙的时候,就喜欢写一些小效果什么的,一来复习复习,二来可以发现一些问题. 今天在群里看别人发了一手表的图片,卧槽...妥妥的工作好多年的节奏,后来想想还是做好自己的事情算了,想那多干啥,就 ...