Now let’s create an index named "customer" and then list all the indexes again:

现在让我们创建一个名为“customer”的索引,然后再次列出所有索引:
PUT /customer?pretty
GET /_cat/indices?v

The first command creates the index named "customer" using the PUT verb. We simply append pretty to the end of the call to tell it to pretty-print the JSON response (if any).

第一个命令使用PUT动词创建名为“customer”的索引。我们只是简单地追加到调用的结尾,告诉它打印JSON响应(如果有的话)。
And the response:
health status index    uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open customer 95SQ4TSUT7mWBT7VNHH67A 260b 260b

The results of the second command tells us that we now have 1 index named customer and it has 5 primary shards and 1 replica (the defaults) and it contains 0 documents in it.

第二个命令的结果告诉我们,我们现在有一个名为customer的索引,它有5个主分片和1个副本(默认值),并且它包含0个文档。
 
You might also notice that the customer index has a yellow health tagged to it. Recall from our previous discussion that yellow means that some replicas are not (yet) allocated. The reason this happens for this index is because Elasticsearch by default created one replica for this index. 
您可能还注意到客户索引标记了黄色运行状况。回想一下我们之前的讨论,黄色表示某些副本尚未(尚未)分配。此索引发生这种情况的原因是因为默认情况下Elasticsearch为此索引创建了一个副本。
 
Since we only have one node running at the moment, that one replica cannot yet be allocated (for high availability) until a later point in time when another node joins the cluster. Once that replica gets allocated onto a second node, the health status for this index will turn to green.
由于我们目前只有一个节点在运行,因此在另一个节点加入集群的较晚时间点之前,尚无法分配一个副本(用于高可用性)。将该副本分配到第二个节点后,此索引的运行状况将变为绿色。

(七)Create an Index的更多相关文章

  1. EXCEPTION:FATAL: UNABLE TO CREATE ‘…GIT/INDEX.LOCK’ FILE EXISTS

    FATAL: UNABLE TO CREATE ‘…GIT/INDEX.LOCK’ FILE EXISTS Hi, Today I will share you my other experience ...

  2. 58. :CREATE UNIQUE INDEX 终止,因为发现对象名称 'dbo.tSysParam' 和索引名称 'PK_tSysParam' 有重复的键

    更改实体对应表结构失败[修改实体对象表结构失败[修改表[tSysParam]的主键信息失败:CREATE UNIQUE INDEX 终止,因为发现对象名称 'dbo.tSysParam' 和索引名称 ...

  3. Create an Index

    db.collection.createIndex( { name: -1 } ) Indexes — MongoDB Manual https://docs.mongodb.com/manual/i ...

  4. create ‘/.git/index.lock’: File exists.

    Git – fatal: Unable to create ‘/.git/index.lock’: File exists. fatal: Unable to create ‘/path/my_pro ...

  5. Git – fatal: Unable to create ‘/.git/index.lock’: File exists错误解决办法

    有时候在提交的时候,中间提交出错,导致有文件被lock,所以会报下面的错误: fatal: Unable to create ‘/msg/.git/index.lock’: File exists. ...

  6. Avoiding “will create implicit index” NOTICE

    执行PgSql避免 notice 信息,执行之前加入以下语句调整报错级别即可: SET CLIENT_MIN_MESSAGES = ‘WARNING’;

  7. Sql Server创建主键失败:CREATE UNIQUE INDEX 终止,因为发现对象名称 '[PPR_BasicInformation]' 和索引名称 '[PK_PPR_BasicInformation]' 有重复的键(E)

    这种问题是由于主键设置了唯一性,而数据库中主键列的值又有重复的值,重复值为E,改掉其中一个值就可以了.

  8. 无法CREATE UNIQUE INDEX;找到重复的关键字

  9. DirectX11笔记(七)--Direct3D渲染3--INDICES AND INDEX BUFFERS

    原文:DirectX11笔记(七)--Direct3D渲染3--INDICES AND INDEX BUFFERS 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.cs ...

随机推荐

  1. RxJS 实现摩斯密码(Morse) 【内附脑图】

    参加 2018 ngChina 开发者大会,特别喜欢 Michael Hladky 奥地利帅哥的 RxJS 分享,现在拿出来好好学习工作坊的内容(工作坊Demo地址),结合这个示例,做了一个改进版本, ...

  2. 冗余jar包识别神器 - loose.jar

    冗余jar包识别神器 - loose.jar 场景描述 项目迭代久了,会添加各类jar包,事实上很多jar包其实根本没用到.那如何快速识别冗余的jar,以方便从项目中清除掉呢? 比如: 该简单的测试工 ...

  3. cache2go - cachetable源码分析

    今天我们来看cachetable.go这个源码文件,除了前面介绍过的主要数据结构CacheTable外还有如下2个类型: 下面先看剩下2个类型是怎么定义的: CacheItemPair非常简单,注释一 ...

  4. springmvc 项目完整示例05 日志 --log4j整合 配置 log4j属性设置 log4j 配置文件 log4j应用

    log4j 就是log for java嘛,老外都喜欢这样子,比如那个I18n  ---internationalization  不就是i和n之间有18个字母... http://logging.a ...

  5. [java]static关键字的四种用法

    在java的关键字中,static和final是两个我们必须掌握的关键字.不同于其他关键字,他们都有多种用法,而且在一定环境下使用,可以提高程序的运行性能,优化程序的结构.下面我们先来了解一下stat ...

  6. PLSQL创建Oracle定时任务

    在使用oracle最匹配的工具plsql的时候,如果用plsql创建定时器呢?下面我简单介绍使用工具创建定时器的方法: 1.创建任务执行的存储过程,如名称为YxtestJob,向测试表中插入数据 cr ...

  7. MySql 注意点

    每条操作语句的结束都要加:(遇到:就会执行操作) DELIMITER 其实本身相当 :当存储过程中包含:的时候,就需要用 DELIMITER 来区分 我们会经常看到 DELIMITER $$ 或者DE ...

  8. React的组件模式

    组件是 React 的核心,因此了解如何利用它们对于创建优秀的设计结构至关重要. 什么是组件 根据 React 官网的介绍,"组件让你可以将 UI 分割成独立的.可重用的部分,并独立管理每个 ...

  9. 移动端web自适应适配布局解决方案

    100%还原设计图,要注意: 看布局,分析结构. 感觉难点在于: 1.测量精度(ps测量数据): 2.文字的行高. 前段时间写个移动端适配的页面(刚接触这方面),查了一些资料,用以下方法能实现: 1. ...

  10. MyCat | 分库分表实践

    引言 先给大家介绍2个概念:数据的切分(Sharding)根据其切分规则的类型,可以分为两种切分模式. 切分模式 一种是按照不同的表(或者Schema)来切分到不同的数据库(主机)之上,这种切可以称之 ...