首页 > 其他分享 >ElasticSearch之Get index settings API

ElasticSearch之Get index settings API

时间:2023-12-02 16:57:28浏览次数:25  
标签:index settings translog testindex 002 API 参数

获取指定索引的参数的值。

获取指定索引的全部参数,命令样例如下:

curl -X GET "https://localhost:9200/testindex_002/_settings?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"

执行结果的样例,如下:

{
  "testindex_002" : {
    "settings" : {
      "index" : {
        "routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_content"
            }
          }
        },
        "number_of_shards" : "3",
        "provided_name" : "testindex_002",
        "creation_date" : "1701498436722",
        "number_of_replicas" : "2",
        "uuid" : "k6twq9y9Qtmcs2AHK-USEQ",
        "version" : {
          "created" : "8500003"
        }
      }
    }
  }
}

获取指定索引的指定参数,精确指定参数名,命令样例如下:

curl -X GET "https://localhost:9200/testindex_002/_settings/index.number_of_shards?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
{
  "testindex_002" : {
    "settings" : {
      "index" : {
        "number_of_shards" : "3"
      }
    }
  }
}

获取指定索引的指定参数,模糊匹配参数名,命令样例如下:

curl -X GET "https://localhost:9200/testindex_002/_settings/index.translog.*?flat_settings=true&include_defaults=true&pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
{
  "testindex_002" : {
    "settings" : { },
    "defaults" : {
      "index.translog.durability" : "REQUEST",
      "index.translog.flush_threshold_age" : "1m",
      "index.translog.flush_threshold_size" : "10gb",
      "index.translog.generation_threshold_size" : "64mb",
      "index.translog.retention.age" : "-1",
      "index.translog.retention.size" : "-1",
      "index.translog.sync_interval" : "5s"
    }
  }
}

方法参数
flat_settings
include_defaults
ignore_unavailable
local

相关资料

标签:index,settings,translog,testindex,002,API,参数
From: https://www.cnblogs.com/jackieathome/p/17871835.html

相关文章

  • 探索 Web API:SpeechSynthesis 与文本语言转换技术
    一、引言随着科技的不断发展,人机交互的方式也在不断演变。语音识别和合成技术在人工智能领域中具有重要地位,它们为残障人士和日常生活中的各种场景提供了便利。WebAPI是Web应用程序接口的一种,允许开发者构建与浏览器和操作系统集成的应用程序。本文将探讨WebAPI中的Spe......
  • 【JavaSE】时间API
    JDK8版本之前的时间API(了解)Data类SimpleDateFormat类SimpleDateFormat类指定格式查API帮助文档即可SimpleDateFormatDemo.javaimportjava.text.ParseException;importjava.text.SimpleDateFormat;importjava.util.Date;publicclassSimpleDateFormatDemo{pu......
  • ElasticSearch之Get index API
    获取指定索引的基本信息。命令样例如下:curl-XGET"https://localhost:9200/testindex_001?pretty"--cacert$ES_HOME/config/certs/http_ca.crt-u"elastic:ohCxPH=QBE+s5=*lo7F9"执行结果的样例,如下:{"testindex_002":{"aliases":{},......
  • ElasticSearch之Exists API
    检查指定名称的索引是否存在。命令样例如下:curl-I"https://localhost:9200/testindex_002?pretty"--cacert$ES_HOME/config/certs/http_ca.crt-u"elastic:ohCxPH=QBE+s5=*lo7F9"假如索引不存在,则执行结果的样例,如下:HTTP/1.1404NotFoundX-elastic-product:Elastics......
  • ElasticSearch之Open index API
    打开指定的索引。命令样例如下:curl-XPOST"https://localhost:9200/testindex_003/_open?pretty"--cacert$ES_HOME/config/certs/http_ca.crt-u"elastic:ohCxPH=QBE+s5=*lo7F9"执行结果的样例,如下:{"acknowledged":true,"shards_acknowledge......
  • 学习笔记4:JavaSE & API(网络编程 & 多线程)
    1、java.net.Socket:(1)定义:Socket(套接字)封装了TCP协议的通讯细节,是的我们使用它可以与服务端建立网络链接,并通过它获取两个流(一个输入一个输出),然后使用这两个流的读写操作完成与服务端的数据交互。(2)方法getInputStream():获取输入流,返回值是InputStream的一个子类实例。ge......
  • ElasticSearch之Close index API
    关闭指定的索引。索引关闭之后:停止对读、写操作的响应。停止检索操作的响应。在索引关闭前,允许执行的操作,关闭之后均不允许执行。ElasticSearch取消对索引的相关维护操作,包含内存中的数据结构,以及保存在存储中的数据。占用的存储空间,并不会主动释放。ElasticSearch不会删除......
  • ElasticSearch之Clone index API
    使用已有的索引,复制得到一个索引。关闭testindex_001的写入操作,命令样例如下:curl-XPUT"https://localhost:9200/testindex_001/_settings?pretty"-H'Content-Type:application/json'-d'{"settings":{"index.blocks.write":true}}......
  • ElasticSearch之Create index API
    创建指定名称的index。命令样例如下:curl-XPUT"https://localhost:9200/testindex_002?pretty"-H'Content-Type:application/json'-d'{"settings":{"index":{"number_of_shards":3,"number......
  • ElasticSearch之Clear cache API
    本方法用于清理缓存。命令样例如下:curl-XPOST"https://localhost:9200/testindex_001/_cache/clear?pretty"--cacert$ES_HOME/config/certs/http_ca.crt-u"elastic:ohCxPH=QBE+s5=*lo7F9"执行结果的样例,如下:{"_shards":{"total":2,......