获取指定索引的基本信息。

命令样例如下:

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

执行结果的样例,如下:

{
"testindex_002" : {
"aliases" : { },
"mappings" : { },
"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"
}
}
}
}
}

假如索引不存在,执行结果的样例,如下:

{
"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index [testindex_003]",
"resource.type" : "index_or_alias",
"resource.id" : "testindex_003",
"index_uuid" : "_na_",
"index" : "testindex_003"
}
],
"type" : "index_not_found_exception",
"reason" : "no such index [testindex_003]",
"resource.type" : "index_or_alias",
"resource.id" : "testindex_003",
"index_uuid" : "_na_",
"index" : "testindex_003"
},
"status" : 404
}

方法参数

features,默认值为aliases,mappings,settings

使用逗号分隔,可选值,如下:

  • aliases
  • mappings
  • settings

flat_settings,使用展平的形式,呈现参数的名称。

include_defaults,指示响应中包含使用默认值的参数。

增加flat_settingsinclude_defaults,命令样例如下:

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

执行结果的样例,如下:

{
"testindex_002" : {
"aliases" : { },
"mappings" : { },
"settings" : {
"index.creation_date" : "1701498436722",
"index.number_of_replicas" : "2",
"index.number_of_shards" : "3",
"index.provided_name" : "testindex_002",
"index.routing.allocation.include._tier_preference" : "data_content",
"index.uuid" : "k6twq9y9Qtmcs2AHK-USEQ",
"index.version.created" : "8500003"
},
"defaults" : {
"index.allocation.existing_shards_allocator" : "gateway_allocator",
"index.allocation.max_retries" : "5",
"index.analyze.max_token_count" : "10000",
"index.auto_expand_replicas" : "false",
"index.blocks.metadata" : "false",
"index.blocks.read" : "false",
"index.blocks.read_only" : "false",
"index.blocks.read_only_allow_delete" : "false",
"index.blocks.write" : "false",
"index.bloom_filter_for_id_field.enabled" : "true",
"index.codec" : "default",
"index.compound_format" : "1gb",
"index.data_path" : "",
"index.default_pipeline" : "_none",
"index.downsample.origin.name" : "",
"index.downsample.origin.uuid" : "",
"index.downsample.source.name" : "",
"index.downsample.source.uuid" : "",
"index.downsample.status" : "unknown",
"index.fast_refresh" : "false",
"index.fielddata.cache" : "node",
"index.final_pipeline" : "_none",
"index.flush_after_merge" : "512mb",
"index.force_memory_term_dictionary" : "false",
"index.format" : "0",
"index.frozen" : "false",
"index.gc_deletes" : "60s",
"index.hidden" : "false",
"index.highlight.max_analyzed_offset" : "1000000",
"index.highlight.weight_matches_mode.enabled" : "true",
"index.indexing.slowlog.level" : "TRACE",
"index.indexing.slowlog.reformat" : "true",
"index.indexing.slowlog.source" : "1000",
"index.indexing.slowlog.threshold.index.debug" : "-1",
"index.indexing.slowlog.threshold.index.info" : "-1",
"index.indexing.slowlog.threshold.index.trace" : "-1",
"index.indexing.slowlog.threshold.index.warn" : "-1",
"index.lifecycle.indexing_complete" : "false",
"index.lifecycle.name" : "",
"index.lifecycle.origination_date" : "-1",
"index.lifecycle.parse_origination_date" : "false",
"index.lifecycle.prefer_ilm" : "true",
"index.lifecycle.rollover_alias" : "",
"index.lifecycle.step.wait_time_threshold" : "12h",
"index.load_fixed_bitset_filters_eagerly" : "true",
"index.look_ahead_time" : "2h",
"index.look_back_time" : "2h",
"index.mapping.coerce" : "false",
"index.mapping.depth.limit" : "20",
"index.mapping.dimension_fields.limit" : "21",
"index.mapping.field_name_length.limit" : "9223372036854775807",
"index.mapping.ignore_malformed" : "false",
"index.mapping.nested_fields.limit" : "50",
"index.mapping.nested_objects.limit" : "10000",
"index.mapping.total_fields.limit" : "1000",
"index.max_adjacency_matrix_filters" : "100",
"index.max_docvalue_fields_search" : "100",
"index.max_inner_result_window" : "100",
"index.max_ngram_diff" : "1",
"index.max_refresh_listeners" : "1000",
"index.max_regex_length" : "1000",
"index.max_rescore_window" : "10000",
"index.max_result_window" : "10000",
"index.max_script_fields" : "32",
"index.max_shingle_diff" : "3",
"index.max_slices_per_scroll" : "1024",
"index.max_terms_count" : "65536",
"index.merge.policy.deletes_pct_allowed" : "20.0",
"index.merge.policy.expunge_deletes_allowed" : "10.0",
"index.merge.policy.floor_segment" : "2mb",
"index.merge.policy.max_merge_at_once" : "10",
"index.merge.policy.max_merge_at_once_explicit" : "30",
"index.merge.policy.max_merged_segment" : "0b",
"index.merge.policy.merge_factor" : "32",
"index.merge.policy.segments_per_tier" : "10.0",
"index.merge.policy.type" : "UNSET",
"index.merge.scheduler.auto_throttle" : "true",
"index.merge.scheduler.max_merge_count" : "7",
"index.merge.scheduler.max_thread_count" : "2",
"index.mode" : "standard",
"index.number_of_routing_shards" : "3",
"index.optimize_auto_generated_id" : "true",
"index.override_write_load_forecast" : "0.0",
"index.percolator.map_unmapped_fields_as_text" : "false",
"index.priority" : "1",
"index.queries.cache.enabled" : "true",
"index.query.default_field" : [
"*"
],
"index.query.parse.allow_unmapped_fields" : "true",
"index.query_string.lenient" : "false",
"index.recovery.type" : "",
"index.refresh_interval" : "1s",
"index.requests.cache.enable" : "true",
"index.rollup.source.name" : "",
"index.rollup.source.uuid" : "",
"index.routing.allocation.disk.watermark.ignore" : "false",
"index.routing.allocation.enable" : "all",
"index.routing.allocation.total_shards_per_node" : "-1",
"index.routing.rebalance.enable" : "all",
"index.routing_partition_size" : "1",
"index.routing_path" : [ ],
"index.search.idle.after" : "30s",
"index.search.slowlog.level" : "TRACE",
"index.search.slowlog.threshold.fetch.debug" : "-1",
"index.search.slowlog.threshold.fetch.info" : "-1",
"index.search.slowlog.threshold.fetch.trace" : "-1",
"index.search.slowlog.threshold.fetch.warn" : "-1",
"index.search.slowlog.threshold.query.debug" : "-1",
"index.search.slowlog.threshold.query.info" : "-1",
"index.search.slowlog.threshold.query.trace" : "-1",
"index.search.slowlog.threshold.query.warn" : "-1",
"index.search.throttled" : "false",
"index.shard.check_on_startup" : "false",
"index.shard_limit.group" : "normal",
"index.soft_deletes.enabled" : "true",
"index.soft_deletes.retention.operations" : "0",
"index.soft_deletes.retention_lease.period" : "12h",
"index.sort.field" : [ ],
"index.sort.missing" : [ ],
"index.sort.mode" : [ ],
"index.sort.order" : [ ],
"index.source_only" : "false",
"index.store.fs.fs_lock" : "native",
"index.store.preload" : [ ],
"index.store.snapshot.blob_cache.metadata_files.max_length" : "64kb",
"index.store.snapshot.cache.enabled" : "true",
"index.store.snapshot.cache.excluded_file_types" : [ ],
"index.store.snapshot.cache.prewarm.enabled" : "true",
"index.store.snapshot.delete_searchable_snapshot" : "false",
"index.store.snapshot.index_name" : "",
"index.store.snapshot.index_uuid" : "",
"index.store.snapshot.partial" : "false",
"index.store.snapshot.repository_name" : "",
"index.store.snapshot.repository_uuid" : "",
"index.store.snapshot.snapshot_name" : "",
"index.store.snapshot.snapshot_uuid" : "",
"index.store.snapshot.uncached_chunk_size" : "-1b",
"index.store.stats_refresh_interval" : "10s",
"index.store.type" : "",
"index.time_series.end_time" : "9999-12-31T23:59:59.999Z",
"index.time_series.es87tsdb_codec.enabled" : "true",
"index.time_series.start_time" : "-9999-01-01T00:00:00Z",
"index.top_metrics_max_size" : "10",
"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",
"index.unassigned.node_left.delayed_timeout" : "1m",
"index.verified_before_close" : "false",
"index.version.compatibility" : "8500003",
"index.warmer.enabled" : "true",
"index.write.wait_for_active_shards" : "1",
"index.xpack.ccr.following_index" : "false",
"index.xpack.version" : "",
"index.xpack.watcher.template.version" : ""
}
}
}

相关资料

ElasticSearch之Get index API的更多相关文章

  1. Elasticsearch:Split index API - 把一个大的索引分拆成更多分片

    文章转载自:https://blog.csdn.net/UbuntuTouch/article/details/108960950

  2. elasticsearch中常用的API

    elasticsearch中常用的API分类如下: 文档API: 提供对文档的增删改查操作 搜索API: 提供对文档进行某个字段的查询 索引API: 提供对索引进行操作,查看索引信息等 查看API: ...

  3. Elasticsearch 单模式下API的增删改查操作

    <pre name="code" class="html">Elasticsearch 单模式下API的增删改查操作 http://192.168. ...

  4. Index API

    Index API 用于在指定索引中添加或更新类型化的JSON文档,使其成为可搜索的. 以下示例将JSON文档插入“twitter”索引中,类型名为“_doc”,ID为1: PUT twitter/_ ...

  5. elasticsearch6.7 05. Document APIs(2)Index API

    Single document APIs Index API Get API Delete API Update API Multi-document APIs Multi Get API Bulk ...

  6. Elasticsearch Java Rest Client API 整理总结 (一)——Document API

    目录 引言 概述 High REST Client 起步 兼容性 Java Doc 地址 Maven 配置 依赖 初始化 文档 API Index API GET API Exists API Del ...

  7. Elasticsearch Java Rest Client API 整理总结 (二) —— SearchAPI

    目录 引言 Search APIs Search API Search Request 可选参数 使用 SearchSourceBuilder 构建查询条件 指定排序 高亮请求 聚合请求 建议请求 R ...

  8. ElasticSearch入门-搜索(java api)

    ElasticSearch入门-搜索(java api) package com.qlyd.searchhelper; import java.util.Map; import net.sf.json ...

  9. Elasticsearch Java Rest Client API 整理总结 (三)——Building Queries

    目录 上篇回顾 Building Queries 匹配所有的查询 全文查询 Full Text Queries 什么是全文查询? Match 全文查询 API 列表 基于词项的查询 Term Term ...

  10. ElasticSearch Index API && Mapping

    ElasticSearch  NEST Client 操作Index var indexName="twitter"; var deleteIndexResponse = clie ...

随机推荐

  1. mpi转以太网连接200plc以太网监控同时与步科触摸屏通信

    西门子PLC200 226PLC转以太网通过PPI-ETH-XD1.0集中采集不占用编程口同时与步科触摸屏通信 现有设备及联网要求客户车间内有6台纺机设备,控制系统采用西门子PLC,型号为CPU226 ...

  2. Springboot简单功能示例-1 实现基本WEB服务

    springboot-sample 介绍 springboot简单示例 跳转到发行版 查看发行版说明 软件架构(当前发行版使用) springboot 安装教程 git clone --branch ...

  3. 文心一言 VS 讯飞星火 VS chatgpt (107)-- 算法导论10.1 5题

    五.用go语言,栈插入和删除元素只能在同一端进行,队列的插入操作和删除操作分别在两端进行,与它们不同的,有一种双端队列(deque),其插入和删除操作都可以在两端进行.写出4个时间均为 O(1)的过程 ...

  4. 自定义MyBatis拦截器更改表名

    by emanjusaka from ​ https://www.emanjusaka.top/archives/10 彼岸花开可奈何 本文欢迎分享与聚合,全文转载请留下原文地址. 自定义MyBati ...

  5. 机器学习实战5-KMeans聚类算法

    概述 聚类 VS 分类 有监督学习 VS 无监督学习 sklearn中的聚类算法 KMeans KMeans参数&接口 n_clusters n_clusters就是KMeans中的K就是告诉 ...

  6. CF1789D Serval and Shift-Shift-Shift 题解

    题目链接 题目分析 首先,看到题目中的左移右移之后再异或,我们自然可以想到在移动的过程中字符串的一段前缀和后缀不会改变,考虑通过这个性质逐位还原. 因为异或 0 不会改变原本的值,所以我们可以找到整个 ...

  7. 手撕Vuex-实现mutations方法

    经过上一篇章介绍,完成了实现 getters 的功能,那么接下来本篇将会实现 mutations 的功能. 在实现之前我们先来回顾一下 mutations 的使用. 将官方的 Vuex 导入进来,因为 ...

  8. Azure Data Factory(十)Data Flow 组件详解

    一,引言 随着大数据技术的不断发展,数据处理和分析变得越来越重要.为了满足企业对数据处理的需求,微软推出了 Azure Data Factory (ADF),它是一个云端的数据集成服务,用于创建.安排 ...

  9. (转)用GPU做DeepLearning要比CPU快40~80倍

    The speed difference of CPU and GPU can be significant in deep learning. But how much? Let's do a te ...

  10. 数据结构与算法 | 动态规划算法(Dynamic Programming)

    上一篇文末已经提到了记忆化搜索是动态规划(Dynamic Programming)的一种形式,是一种自顶向下(Top-Down)的思考方式,通常采用递归的编码形式:既然动态规划有自顶向下(Top-Do ...