1 集群版本
{ "name" : "es-cn-default", "cluster_name" : "es-cn-default", "cluster_uuid" : "MqayQ23q3443y29uUrw9bQ", "version" : { "number" : "7.7.1", "build_flavor" : "default", "build_type" : "tar", "build_hash" : "ad56dce891c901a492bb1ee393f12dfff473a423", "build_date" : "2020-05-28T16:30:01.040088Z", "build_snapshot" : false, "lucene_version" : "8.5.1", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" }
2 查看和设置配置
# 列出索引范围的设置(明确定义) curl “localhost9200/index1/_settings” # 列出 index1 和 index2 的索引范围设置(明确定义) curl "localhost:9200/index1,index2/_settings" # 列出以“index”开头的索引的索引范围设置(明确定义) curl "localhost:9200/index*/_settings" # 列出所有索引的索引范围设置(明确定义) 卷曲“本地主机:9200/_all/_settings” # 以平面格式列出索引范围的设置(明确定义) curl "localhost:9200/index1/_settings?flat_settings" # 列出索引范围的设置(包括默认值) curl "localhost:9200/index1/_settings?include_defaults" # 以平面格式列出索引范围的设置(包括默认值) curl "localhost:9200/index1/_settings?include_defaults&flat_settings" # 更新 index1 的索引范围设置 curl -X PUT "localhost:9200/index1/_settings" -H 'Content-Type: application/json' -d' { "index": { "number_of_replicas": 2 } } # 将索引范围的设置重置为默认值 curl -X PUT "localhost:9200/index1/_settings" -H 'Content-Type: application/json' -d' { "index": { "refresh_interval": null } }
3 查看默认索引的配置
{ "index" : { "settings" : { "index.creation_date" : "1623243817431", "index.indexing.slowlog.level" : "info", "index.indexing.slowlog.source" : "1000", "index.indexing.slowlog.threshold.index.debug" : "50ms", "index.indexing.slowlog.threshold.index.info" : "100ms", "index.indexing.slowlog.threshold.index.trace" : "20ms", "index.indexing.slowlog.threshold.index.warn" : "200ms", "index.number_of_replicas" : "1", "index.number_of_shards" : "12", "index.provided_name" : "dmo_index_testdrive", "index.refresh_interval" : "10s", "index.search.slowlog.level" : "info", "index.search.slowlog.threshold.fetch.debug" : "80ms", "index.search.slowlog.threshold.fetch.info" : "100ms", "index.search.slowlog.threshold.fetch.trace" : "50ms", "index.search.slowlog.threshold.fetch.warn" : "200ms", "index.search.slowlog.threshold.query.debug" : "100ms", "index.search.slowlog.threshold.query.info" : "200ms", "index.search.slowlog.threshold.query.trace" : "50ms", "index.search.slowlog.threshold.query.warn" : "500ms", "index.unassigned.node_left.delayed_timeout" : "5m", "index.uuid" : "KsRHKTI3QbaHHjZ0QaHsFA", "index.version.created" : "7070199" }, "defaults" : { "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.codec" : "default", "index.compound_format" : "0.1", "index.data_path" : "", "index.default_pipeline" : "_none", "index.fielddata.cache" : "node", "index.final_pipeline" : "_none", "index.flush_after_merge" : "512mb", "index.force_memory_id_terms_dictionary" : "false", "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.indexing.slowlog.reformat" : "true", "index.lifecycle.indexing_complete" : "false", "index.lifecycle.name" : "", "index.lifecycle.origination_date" : "-1", "index.lifecycle.parse_origination_date" : "false", "index.lifecycle.rollover_alias" : "", "index.load_fixed_bitset_filters_eagerly" : "true", "index.mapper.dynamic" : "true", "index.mapping.coerce" : "false", "index.mapping.depth.limit" : "20", "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" : "33.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" : "5gb", "index.merge.policy.reclaim_deletes_weight" : "2.0", "index.merge.policy.segments_per_tier" : "10.0", "index.merge.scheduler.auto_throttle" : "true", "index.merge.scheduler.max_merge_count" : "6", "index.merge.scheduler.max_thread_count" : "1", "index.number_of_routing_shards" : "1", "index.optimize_auto_generated_id" : "true", "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.requests.cache.enable" : "true", "index.routing.allocation.enable" : "all", "index.routing.allocation.total_shards_per_node" : "-1", "index.routing.rebalance.enable" : "all", "index.routing_partition_size" : "1", "index.search.idle.after" : "30s", "index.search.throttled" : "false", "index.shard.check_on_startup" : "false", "index.soft_deletes.enabled" : "false", "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.stats_refresh_interval" : "10s", "index.store.type" : "", "index.top_metrics_max_size" : "10", "index.translog.durability" : "REQUEST", "index.translog.flush_threshold_size" : "512mb", "index.translog.generation_threshold_size" : "64mb", "index.translog.retention.age" : "12h", "index.translog.retention.size" : "512MB", "index.translog.sync_interval" : "5s", "index.verified_before_close" : "false", "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" : "" } } }
4 配置项目说明
待补充
文章评论