zoukankan      html  css  js  c++  java
  • (七)Create an Index

    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   5   1          0            0       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.
    由于我们目前只有一个节点在运行,因此在另一个节点加入集群的较晚时间点之前,尚无法分配一个副本(用于高可用性)。将该副本分配到第二个节点后,此索引的运行状况将变为绿色。
  • 相关阅读:
    当一组单选按钮中的一个选中,后文本框为只读属性
    在.net 环境下,进行了伪静态页面处理后,后台的Fckeditor就不能正常显示了
    PL/SQL Developer 8注册码
    选中checkbox后才能填写输入框
    net 试图加载格式不正确的程序。(Exception from HRESULT: 0x8007000B)
    在sql中将varchar型转换成int型再进行排序
    ASP.NET中显示农历时间
    改变自己,拥抱生活
    人生最不值得你去做的事情
    Oracle 中的周、月、日历的查询实现
  • 原文地址:https://www.cnblogs.com/shuaiandjun/p/10271844.html
Copyright © 2011-2022 走看看