{"id":882,"date":"2020-11-27T11:25:44","date_gmt":"2020-11-27T03:25:44","guid":{"rendered":"https:\/\/www.linuxdevops.cn\/?p=882"},"modified":"2020-11-28T10:01:50","modified_gmt":"2020-11-28T02:01:50","slug":"elasticsearch-configuration","status":"publish","type":"post","link":"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/","title":{"rendered":"elasticsearch \u914d\u7f6e"},"content":{"rendered":"

\u8bbe\u7f6e\u526f\u672c\u6570<\/p>\n

PUT \/_all\/_settings?\n{\n  "index.number_of_replicas": 0\n}\n<\/code><\/pre>\n

\u8bbe\u7f6e\u5206\u7247\u6570\u8bbe\u7f6e\u526f\u672c\u6570<\/p>\n

PUT \/_all\/_settings?\n{\n  "index.number_of_replicas": 0\n}\n<\/code><\/pre>\n

\u8bbe\u7f6e\u5206\u7247\u6570<\/p>\n

PUT \/_all\/_settings?\n{\n  "number_of_shards" :  1\n}\n<\/code><\/pre>\n

\u4fee\u6539\u9ed8\u8ba4\u6a21\u677f<\/p>\n

filebeat \u5f00\u5934\u6240\u6709\u7d22\u5f15\u3002\nPUT \/_template\/template_http_request_record\n{\n  "index_patterns": ["filebeat-*"],\n  "settings": {\n    "number_of_shards": 1,\n    "number_of_replicas": 0\n  }\n}\n\u5168\u90e8\u7d22\u5f15\nPUT \/_template\/template_http_request_record\n{\n  "index_patterns": ["*"],\n  "settings": {\n    "number_of_shards": 1,\n    "number_of_replicas": 0\n  }\n}\nPUT \/_all\/_settings?\n{\n  "number_of_shards" :  1\n}\n<\/code><\/pre>\n

\u4fee\u6539\u9ed8\u8ba4\u6a21\u677f<\/p>\n

filebeat \u5f00\u5934\u6240\u6709\u7d22\u5f15\u3002\nPUT \/_template\/template_http_request_record\n{\n  "index_patterns": ["filebeat-*"],\n  "settings": {\n    "number_of_shards": 1,\n    "number_of_replicas": 0\n  }\n}\n\n\u5168\u90e8\u7d22\u5f15\nPUT \/_template\/template_http_request_record\n{\n  "index_patterns": ["*"],\n  "settings": {\n    "number_of_shards": 1,\n    "number_of_replicas": 0\n  }\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"

\u8bbe\u7f6e\u526f\u672c\u6570 PUT \/_all\/_settings? { "index.number_of_repl<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,18],"tags":[],"yoast_head":"\nelasticsearch \u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"elasticsearch \u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"og:description\" content=\"\u8bbe\u7f6e\u526f\u672c\u6570 PUT \/_all\/_settings? { "index.number_of_repl\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-27T03:25:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-28T02:01:50+00:00\" \/>\n<meta name=\"author\" content=\"\u7ba1\u7406\u5458\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/\"},\"author\":{\"name\":\"\u7ba1\u7406\u5458\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"headline\":\"elasticsearch \u914d\u7f6e\",\"datePublished\":\"2020-11-27T03:25:44+00:00\",\"dateModified\":\"2020-11-28T02:01:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/\"},\"wordCount\":1,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"articleSection\":[\"Linux\",\"Linux\u670d\u52a1\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/\",\"name\":\"elasticsearch \u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\"},\"datePublished\":\"2020-11-27T03:25:44+00:00\",\"dateModified\":\"2020-11-28T02:01:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.linuxdevops.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\",\"item\":\"https:\/\/www.linuxdevops.cn\/linux\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"elasticsearch \u914d\u7f6e\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\",\"url\":\"https:\/\/www.linuxdevops.cn\/\",\"name\":\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\",\"description\":\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\u7b14\u8bb0\",\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"alternateName\":\"linuxdevops\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.linuxdevops.cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\",\"name\":\"\u7ba1\u7406\u5458\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg\",\"contentUrl\":\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg\",\"width\":512,\"height\":512,\"caption\":\"\u7ba1\u7406\u5458\"},\"logo\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/\"},\"description\":\"\u7ba1\u7406\u5458\",\"url\":\"https:\/\/www.linuxdevops.cn\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"elasticsearch \u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/","og_locale":"zh_CN","og_type":"article","og_title":"elasticsearch \u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","og_description":"\u8bbe\u7f6e\u526f\u672c\u6570 PUT \/_all\/_settings? { "index.number_of_repl","og_url":"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/","og_site_name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","article_published_time":"2020-11-27T03:25:44+00:00","article_modified_time":"2020-11-28T02:01:50+00:00","author":"\u7ba1\u7406\u5458","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/#article","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/"},"author":{"name":"\u7ba1\u7406\u5458","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"headline":"elasticsearch \u914d\u7f6e","datePublished":"2020-11-27T03:25:44+00:00","dateModified":"2020-11-28T02:01:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/"},"wordCount":1,"commentCount":0,"publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"articleSection":["Linux","Linux\u670d\u52a1"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/","url":"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/","name":"elasticsearch \u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/#website"},"datePublished":"2020-11-27T03:25:44+00:00","dateModified":"2020-11-28T02:01:50+00:00","breadcrumb":{"@id":"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.linuxdevops.cn\/2020\/11\/elasticsearch-configuration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.linuxdevops.cn\/"},{"@type":"ListItem","position":2,"name":"Linux","item":"https:\/\/www.linuxdevops.cn\/linux\/"},{"@type":"ListItem","position":3,"name":"elasticsearch \u914d\u7f6e"}]},{"@type":"WebSite","@id":"https:\/\/www.linuxdevops.cn\/#website","url":"https:\/\/www.linuxdevops.cn\/","name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","description":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\u7b14\u8bb0","publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"alternateName":"linuxdevops","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.linuxdevops.cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":["Person","Organization"],"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1","name":"\u7ba1\u7406\u5458","image":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/","url":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg","contentUrl":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg","width":512,"height":512,"caption":"\u7ba1\u7406\u5458"},"logo":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/"},"description":"\u7ba1\u7406\u5458","url":"https:\/\/www.linuxdevops.cn\/author\/root\/"}]}},"_links":{"self":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/882"}],"collection":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/comments?post=882"}],"version-history":[{"count":11,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/882\/revisions"}],"predecessor-version":[{"id":905,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/882\/revisions\/905"}],"wp:attachment":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/media?parent=882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/categories?post=882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/tags?post=882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}