{"id":1308,"date":"2014-12-30T12:06:12","date_gmt":"2014-12-30T04:06:12","guid":{"rendered":"https:\/\/cowmanchiang.me\/wp\/?p=1308"},"modified":"2023-10-31T15:44:07","modified_gmt":"2023-10-31T07:44:07","slug":"elasticsearch-yml-%e6%aa%94%e6%a1%88%e8%aa%aa%e6%98%8e","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=1308","title":{"rendered":"elasticsearch.yml \u6a94\u6848\u8aaa\u660e"},"content":{"rendered":"<pre lang=\"bash\">##################### Elasticsearch Configuration Example #####################\n\n# This file contains an overview of various configuration settings,\n# targeted at operations staff. Application developers should\n# consult the guide at <http:\/\/elasticsearch.org\/guide>.<\/pre>\n<p>\u8aaa\u660e\u6b64\u6a94\u6848\u5305\u542b\u591a\u500b\u8a2d\u5b9a\u7684\u90e8\u4efd\uff0c\u53ef\u4ee5\u81f3 <a href=\"http:\/\/elasticsearch.org\/guide\" title=\"Elasticsearch Guide\" target=\"_blank\" rel=\"noopener noreferrer\">Elasticsearch Guide<\/a> \u89c0\u770b\u8aaa\u660e<\/p>\n<pre lang=\"bash\">#\n# The installation procedure is covered at\n# <http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/setup.html>.<\/pre>\n<p>\u5b89\u88dd\u76f8\u95dc\u7684\u90e8\u4efd\u53ef\u53c3\u8003 <a href=\"http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/setup.html\" title=\"Elasticsearch \u5b89\u88dd\u8aaa\u660e\" target=\"_blank\" rel=\"noopener noreferrer\">Elasticsearch \u5b89\u88dd\u8aaa\u660e<\/a><\/p>\n<pre lang=\"bash\">#\n# Elasticsearch comes with reasonable defaults for most settings,\n# so you can try it out without bothering with configuration.<\/pre>\n<p>Elasticsearch\u9810\u8a2d\u6703\u5957\u7528\u8a31\u591a\u8a2d\u5b9a\uff0c\u6240\u5df2\u53ef\u4ee5\u4e0d\u7528\u66f4\u6539\u8a2d\u5b9a\u5c31\u53ef\u5148\u9032\u884c\u6e2c\u8a66<\/p>\n<pre lang=\"bash\">#\n# Most of the time, these defaults are just fine for running a production\n# cluster. If you're fine-tuning your cluster, or wondering about the\n# effect of certain configuration option, please _do ask_ on the\n# mailing list or IRC channel [http:\/\/elasticsearch.org\/community].<\/pre>\n<p>\u9810\u8a2d\u60c5\u6cc1\u4e0b\uff0c\u7d55\u5927\u90e8\u5206\u90fd\u80fd\u5920\u652f\u61c9\u4e00\u500b\u751f\u7522\u60c5\u6cc1\u4e0b\u7684Cluster\uff0c\u5047\u5982\u60f3\u8981\u8a66\u8457\u8abf\u6574\u8a2d\u5b9a\uff0c\u6216\u662f\u64d4\u5fc3\u66f4\u6539\u8a2d\u5b9a\u6703\u5f71\u97ff\u6574\u5404\u670d\u52d9\uff0c\u53ef\u4ee5\u5beb\u4fe1\u7d66\u958b\u767c\u5718\u968a\u6216\u662f\u81f3 <a href=\"http:\/\/elasticsearch.org\/community\" title=\"Elasticsearch \u793e\u7fa4\" target=\"_blank\" rel=\"noopener noreferrer\">Elasticsearch \u793e\u7fa4<\/a> \u8a62\u554f<\/p>\n<pre lang=\"bash\"># Any element in the configuration can be replaced with environment variables\n# by placing them in ${...} notation. For example:\n#\n# node.rack: ${RACK_ENV_VAR}<\/pre>\n<p>\u4efb\u4f55\u8a2d\u5b9a\u6a94\u7684\u5143\u7d20\u7686\u53ef\u4ee5\u4f7f\u7528\u74b0\u5883\u8b8a\u6578<\/p>\n<pre lang=\"bash\"># For information on supported formats and syntax for the config file, see\n# <http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/setup-configuration.html><\/pre>\n<p>\u91dd\u5c0d\u8a2d\u5b9a\u6a94\u5167\u90e8\u6240\u652f\u63f4\u7684\u683c\u5f0f\u53ef\u4ee5\u53c3\u8003 <a href=\"http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/setup-configuration.html\" title=\"Elasticsearch \u5b89\u88dd\u8a2d\u5b9a\u8aaa\u660e\" target=\"_blank\" rel=\"noopener noreferrer\">Elasticsearch \u5b89\u88dd\u8a2d\u5b9a\u8aaa\u660e<\/a><\/p>\n<pre lang=\"bash\">################################### Cluster ###################################\n\n# Cluster name identifies your cluster for auto-discovery. If you're running\n# multiple clusters on the same network, make sure you're using unique names.\n#\n cluster.name: elasticsearch<\/pre>\n<p>\u8a2d\u5b9acluster\u7684\u540d\u7a31\uff0c\u5f8c\u7e8c\u5c07\u4f7f\u7528multicast\u9032\u884c\u8a62\u554fserver\u5728\u54ea\u88e1\uff0c\u7576server\u6536\u5230multicast\u5f8c\u5c31\u6703\u8ddfnode\u9032\u884c\u806f\u7e6b<\/p>\n<pre lang=\"bash\">#################################### Node #####################################\n\n# Node names are generated dynamically on startup, so you're relieved\n# from configuring them manually. You can tie this node to a specific name:\n#\n node.name: \"Cowb\"<\/pre>\n<p>\u5c0d\u672cnode\u9032\u884c\u547d\u540d<\/p>\n<pre lang=\"bash\"># Every node can be configured to allow or deny being eligible as the master,\n# and to allow or deny to store the data.\n#\n# Allow this node to be eligible as a master node (enabled by default):\n#\n# node.master: true\n#\n# Allow this node to store data (enabled by default):\n#\n# node.data: true<\/pre>\n<p>\u5728\u6b64\u5148\u5c0dmaster node\u8ddfdata node\u9032\u884c\u89e3\u91cb<br \/>\n[\u6458\u9304\u81eaElasticsearch Server, 2nd Edition\u7b2c324\u9801]<br \/>\nThe master node is the one that checks all the other nodes to see if they are responsive (other nodes ping the master too). The master node will also accept the new nodes that want to join the cluster. If the master is somehow disconnected from the cluster, the remaining nodes will select a new master from among themselves. All these processes are done automatically on the basis of the configuration values we provide.<br \/>\nBy default, Elasticsearch allows every node to be a master node and a data node. However, in certain situations, you may want to have worker nodes that will only hold the data and master nodes that will only be used to process requests and manage the cluster.<br \/>\n\u900f\u904e\u4e0a\u9762\u7684\u8aaa\u660e\u53ef\u4ee5\u53ea\u5230master node\u5c31\u6709\u9ede\u50cf\u662fp2p\u74b0\u5883\u4e2d\u7684\u4e3b\u7d50\u9ede\uff0c\u7528\u4f86\u7ba1\u7406cluster\u5167\u5404node<br \/>\n\u800cdata node\u4e3b\u8981\u5c31\u7528\u4f86\u5132\u5b58\u8cc7\u6599\uff0c\u5728\u9810\u8a2d\u60c5\u6cc1\u4e0b\uff0c\u90fd\u662fenabled\u7684<\/p>\n<p>&lt;<\/p>\n<p>pre lang=&#8221;bash&#8221;># You can exploit these settings to design advanced cluster topologies.<br \/>\n#<\/p>\n<h1>1. You want this node to never become a master node, only to hold data.<\/h1>\n<h1>This will be the &#8220;workhorse&#8221; of your cluster.<\/h1>\n<p>#<\/p>\n<h1>node.master: false<\/h1>\n<h1>node.data: true<\/h1>\n<p>&lt;<\/p>\n<p>pre><\/p>\n<p>\u5047\u8a2d\u4f60\u53ea\u60f3\u628a\u6b64node\u7528\u4f86\u5132\u5b58\u8cc7\u6599\uff0c\u4e0d\u4f5c\u70bamaster node<\/p>\n<pre lang=\"bash\">#\n# 2. You want this node to only serve as a master: to not store any data and\n#    to have free resources. This will be the \"coordinator\" of your cluster.\n#\n# node.master: true\n# node.data: false<\/pre>\n<p>\u5047\u8a2d\u6b64node\u4e0d\u5132\u5b58\u8cc7\u6599\uff0c\u4f46\u53ef\u4f5c\u70bamaster node<\/p>\n<pre lang=\"bash\">#\n# 3. You want this node to be neither master nor data node, but\n#    to act as a \"search load balancer\" (fetching data from nodes,\n#    aggregating results, etc.)\n#\n# node.master: false\n# node.data: false<\/pre>\n<p>\u5047\u8a2d\u6b64node\u65e2\u4e0d\u5132\u5b58\u8cc7\u6599\u4ea6\u4e0d\u505a\u70bamaster node\uff0c\u53ea\u4f9b\u505a\u641c\u5c0b\u6216\u641c\u5c0b\u7684\u8ca0\u8f09\u5e73\u8861\u4f7f\u7528<br \/>\n\u6b64\u6642\u6703\u5f9e\u5176\u5b83\u6709\u8cc7\u6599\u7684node\u9032\u884c\u8cc7\u6599\u7684\u64f7\u53d6<\/p>\n<pre lang=\"bash\"># Use the Cluster Health API [http:\/\/localhost:9200\/_cluster\/health], the\n# Node Info API [http:\/\/localhost:9200\/_nodes] or GUI tools\n# such as <http:\/\/www.elasticsearch.org\/overview\/marvel\/>,\n# <http:\/\/github.com\/karmi\/elasticsearch-paramedic>,\n# <http:\/\/github.com\/lukas-vlcek\/bigdesk> and\n# <http:\/\/mobz.github.com\/elasticsearch-head> to inspect the cluster state.<\/pre>\n<p>\u53ef\u900f\u904e\u9023\u7d50&#8221;http:\/\/localhost:9200\/_cluster\/health&#8221;\u53d6\u5f97cluster\u7684\u72c0\u614b\u8cc7\u8a0a\uff0c\u5c07\u4ee5json\u8cc7\u6599\u986f\u793a<br \/>\n\u4e26\u4e5f\u53ef\u900f\u904e\u9023\u7d50&#8221;http:\/\/localhost:9200\/_nodes&#8221;\u53d6\u5f97cluster\u5167\u5404node\u7684\u72c0\u614b\u8cc7\u8a0a\uff0c\u4ea6\u662f\u4ee5json\u8cc7\u6599\u986f\u793a<br \/>\n\u6216\u662f\u900f\u904e\u5b89\u88dd\u4e00\u4e9bGUI\u5de5\u5177\u4f86\u89c0\u770b <a href=\"http:\/\/www.elasticsearch.org\/overview\/marvel\/\" title=\"Marvel\" target=\"_blank\" rel=\"noopener noreferrer\">Marvel<\/a>\u3001<a href=\"http:\/\/github.com\/karmi\/elasticsearch-paramedic\" title=\"elasticsearch-paramedic\" target=\"_blank\" rel=\"noopener noreferrer\">elasticsearch-paramedic<\/a>\u3001<a href=\"http:\/\/github.com\/lukas-vlcek\/bigdesk\" title=\"bigdesk\" target=\"_blank\" rel=\"noopener noreferrer\">bigdesk<\/a>\u6216<a href=\"http:\/\/mobz.github.com\/elasticsearch-head\" title=\"elasticsearch-head\" target=\"_blank\" rel=\"noopener noreferrer\">elasticsearch-head<\/a><\/p>\n<p>\u9019\u908a\u4ee5elasticsearch-head\u505a\u70ba\u7bc4\u4f8b<br \/>\n&#8220;\/usr\/share\/elasticsearch\/bin\/plugin -install mobz\/elasticsearch-head&#8221;<br \/>\n\u7576\u5b89\u88dd\u5b8c\u5f8c\u9023\u7d50\u7db2\u5740 &#8220;http:\/\/localhost:9200\/_plugin\/head\/&#8221; \u89c0\u770b<\/p>\n<pre lang=\"bash\"># A node can have generic attributes associated with it, which can later be used\n# for customized shard allocation filtering, or allocation awareness. An attribute\n# is a simple key value pair, similar to node.key: value, here is an example:\n#\n# node.rack: rack314\n\n# By default, multiple nodes are allowed to start from the same installation location\n# to disable it, set the following:\n# node.max_local_storage_nodes: 1<\/pre>\n<p>\u8aaa\u660e\u5c6c\u5b9a\u8a2d\u5b9a\u63a1\u7528key value\u5c0d\u61c9\u7684\u65b9\u5f0f<br \/>\n\u4e26\u4e14\u5728\u9810\u8a2d\u60c5\u6cc1\u4e0b\uff0c\u5141\u8a31\u540c\u4e00\u81fahost\u4e2d\u53ef\u4ee5\u904b\u884c\u591a\u500bnode\u540c\u6642\u9032\u884c\uff0c\u5982\u679c\u8981\u95dc\u9589\u6b64\u529f\u80fd\uff0c\u5247\u8a2d\u5b9a<br \/>\n&#8220;node.max_local_storage_nodes: 1&#8221;<br \/>\n\u5176value\u5c31\u8868\u793a\u5728\u672clocal host\u74b0\u5883\u4e2d\u53ef\u4ee5\u904b\u884c\u7684nodes\u6578\u4e0a\u9650<br \/>\n\u53ef\u4ee5\u53c3\u8003 <a href=\"https:\/\/groups.google.com\/forum\/#!topic\/moloch-fpc\/VPSPYBAdNrs\" title=\"Google\u8ad6\u58c7\uff1aMultiple elasticsearch nodes on same server\" target=\"_blank\" rel=\"noopener noreferrer\">Google\u8ad6\u58c7\uff1aMultiple elasticsearch nodes on same server<\/a><\/p>\n<pre lang=\"bash\">#################################### Index ####################################\n\n# You can set a number of options (such as shard\/replica options, mapping\n# or analyzer definitions, translog settings, ...) for indices globally,\n# in this file.<\/pre>\n<p>\u5728\u672c\u6a94\u6848\u4e2d\u53ef\u4ee5\u4f7f\u7528\u6578\u5b57\u9078\u9805\u9032\u884c\u8a2d\u5b9a<\/p>\n<pre lang=\"bash\">#\n# Note, that it makes more sense to configure index settings specifically for\n# a certain index, either when creating it or by using the index templates API.\n#\n# See <http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/index-modules.html> and\n# <http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/indices-create-index.html>\n# for more information.<\/pre>\n<p>\u91dd\u5c0d\u5275\u5efaindex\u7684\u53c3\u6578\u6216\u662f\u4f7f\u7528\u7684api\u7684\u53c3\u8003\u8cc7\u8a0a\u53ef\u4ee5\u81f3 <a href=\"http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/index-modules.html\" title=\"Elasticsearch - Resource - Index modules\" target=\"_blank\" rel=\"noopener noreferrer\">Elasticsearch &#8211; Resource &#8211; Index modules<\/a>\u6216<a href=\"http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/indices-create-index.html\" title=\"Elasticsearch - Resource - create index\" target=\"_blank\" rel=\"noopener noreferrer\">Elasticsearch &#8211; Resource &#8211; create index<\/a> \u9032\u884c\u4e86\u89e3<\/p>\n<pre lang=\"bash\"># Set the number of shards (splits) of an index (5 by default):\n#\n# index.number_of_shards: 5<\/pre>\n<p>\u8a2d\u5b9aindex\u53ef\u4ee5\u88ab\u5207\u6210\u5e7e\u5206\uff0c\u9810\u8a2d\u662f5\u4efd<\/p>\n<pre lang=\"bash\"># Set the number of replicas (additional copies) of an index (1 by default):\n#\n# index.number_of_replicas: 1<\/pre>\n<p>\u8a2d\u5b9aindex\u7684\u8907\u672c\u6284\u5beb\u6b21\u6578\uff0c\u9810\u8a2d\u662f1\u4efd<\/p>\n<pre lang=\"bash\"># Note, that for development on a local machine, with small indices, it usually\n# makes sense to \"disable\" the distributed features:\n#\n# index.number_of_shards: 1\n# index.number_of_replicas: 0<\/pre>\n<p>\u5047\u5982\u53ea\u662f\u5728\u672c\u6a5f\u4f7f\u7528\uff0c\u4e14index\u5f88\u5c0f\uff0c\u901a\u5e38\u6703\u5c07shards\u8a2d\u5b9a1\u53careplicas\u8a2d\u5b9a0\u4f86\u95dc\u9589\u5206\u6563\u5f0f\u7684\u529f\u80fd<\/p>\n<pre lang=\"bash\"># These settings directly affect the performance of index and search operations\n# in your cluster. Assuming you have enough machines to hold shards and\n# replicas, the rule of thumb is:\n#\n# 1. Having more *shards* enhances the _indexing_ performance and allows to\n#    _distribute_ a big index across machines.\n# 2. Having more *replicas* enhances the _search_ performance and improves the\n#    cluster _availability_.\n#<\/pre>\n<p>\u901a\u5e38shards\u53careplicas\u7684\u8a2d\u5b9a\u503c\u6703\u5206\u5225\u5f71\u97ff\u5230\u7d22\u5f15\u6216\u641c\u5c0b\u7684\u6548\u80fd\u3002<br \/>\n1. \u7576shards\u503c\u8d8a\u9ad8\u6642\uff0c\u53ef\u4ee5\u589e\u52a0\u7d22\u5f15\u9032\u884c\u7684\u6548\u80fd\uff0c\u4e26\u4e14\u5141\u8a31\u900f\u904e\u591a\u53f0\u6a5f\u5668\u5efa\u7acb\u5927\u7684index<br \/>\n2. \u7576replicas\u503c\u8d8a\u9ad8\u6642\uff0c\u53ef\u4ee5\u589e\u52a0\u641c\u5c0b\u7684\u6548\u80fd\uff0c\u4e26\u4e14\u63d0\u9ad8cluster\u7684\u53ef\u7528\u7387<\/p>\n<p>&lt;<\/p>\n<p>pre lang=&#8221;bash&#8221;># The &#8220;number_of_shards&#8221; is a one-time setting for an index.<br \/>\n#<\/p>\n<h1>The &#8220;number_of_replicas&#8221; can be increased or decreased anytime,<\/h1>\n<h1>by using the Index Update Settings API.<\/h1>\n<h1>\n<\/h1>\n<p>number_of_shards\u5c6c\u65bc\u4e00\u6b21\u6027\u7684\u8a2d\u5b9a\uff0c\u7576index\u5efa\u7acb\u5b8c\u6210\u5f8c\u5c31\u4e0d\u6703\u518d\u9032\u884c\u8ddf\u52d5\uff1b\u800cnumber_of_replicas\u7684\u503c\u5247\u53ef\u4ee5\u96a8\u6642\u900f\u904e\u8a2d\u5b9a\u7684API\u9032\u884c\u589e\u6e1b\u3002<\/p>\n<pre lang=\"bash\"># Elasticsearch takes care about load balancing, relocating, gathering the\n# results from nodes, etc. Experiment with different settings to fine-tune\n# your setup.\n\n# Use the Index Status API (<http:\/\/localhost:9200\/A\/_status>) to inspect\n# the index status.<\/pre>\n<p>Elasticsearch\u95dc\u6ce8\u65bc\u8ca0\u8f09\u5e73\u8861\u3001\u91cd\u65b0\u914d\u7f6e\u4ee5\u53ca\u5f9enodes\u532f\u96c6\u7d50\u679c\u7b49\u3002\u4e0d\u540c\u8a2d\u5b9a\u7684\u7d93\u9a57\u5c07\u6709\u52a9\u65bc\u4f60\u5728\u8a2d\u5b9a\u7684\u6642\u6548\u80fd\u8abf\u6559\u3002\u53ef\u4ee5\u4f7f\u7528\u9023\u7d50 &#8220;http:\/\/localhost:9200\/A\/_status&#8221; \u89c0\u770b\u5404\u7d22\u5f15\u7684\u72c0\u614b\u3002<\/p>\n<pre lang=\"bash\">#################################### Paths ####################################\n\n# Path to directory containing configuration (this file and logging.yml):\n#\n# path.conf: \/path\/to\/conf<\/pre>\n<p>\u5b58\u653e\u8a2d\u5b9a\u6a94\u7684\u76ee\u9304\uff0c\u9810\u8a2d\u662f\u5728&#8221;\/etc\/elasticsearch&#8221;\u5167<\/p>\n<pre lang=\"bash\"># Path to directory where to store index data allocated for this node.\n#\n# path.data: \/path\/to\/data\n#\n# Can optionally include more than one location, causing data to be striped across\n# the locations (a la RAID 0) on a file level, favouring locations with most free\n# space on creation. For example:\n#\n# path.data: \/path\/to\/data1,\/path\/to\/data2<\/pre>\n<p>\u5b58\u653e\u8cc7\u6599\u7684\u76ee\u9304\uff0c\u9810\u8a2d\u5728&#8221;\/var\/lib\/elasticsearch&#8221;\u4e0b\u3002\u5047\u8a2d\u53ef\u80fd\u56e0\u70ba\u67d0\u4e9b\u539f\u56e0\u9700\u8981\u5c07\u8cc7\u6599\u653e\u7f6e\u65bc\u591a\u500b\u76ee\u9304\u4e2d\uff0c\u4f8b\u5982\u539f\u672c\u7684\u76ee\u9304\u7a7a\u9593\u4e0d\u8db3\u4e86\uff0c\u5247\u53ef\u4ee5\u8a2d\u5b9a\u591a\u500b\u5b58\u653e\u7684\u76ee\u9304\u4f9bElasticsearch\u9032\u884c\u5b58\u653e\u8cc7\u6599\uff0c\u9019\u908a\u5c07\u6703\u4ee5\u6a94\u6848\u7684\u65b9\u5f0f\u9032\u884c\u5207\u5272\uff0c\u5c31\u597d\u50cfRAID 0\u7684\u65b9\u5f0f\u3002<\/p>\n<pre lang=\"bash\"># Path to temporary files:\n#\n# path.work: \/path\/to\/work<\/pre>\n<p>\u5b58\u653e\u57f7\u884cpid\u7684\u76ee\u9304<\/p>\n<pre lang=\"bash\"># Path to log files:\n#\n# path.logs: \/path\/to\/logs<\/pre>\n<p>\u5b58\u653elog\u7684\u76ee\u9304<\/p>\n<pre lang=\"bash\"># Path to where plugins are installed:\n#\n# path.plugins: \/path\/to\/plugins<\/pre>\n<p>\u5b58\u653e\u5b89\u88ddplugin\u7684\u76ee\u9304<\/p>\n<pre lang=\"bash\">#################################### Plugin ###################################\n\n# If a plugin listed here is not installed for current node, the node will not start.\n#\n# plugin.mandatory: mapper-attachments,lang-groovy<\/pre>\n<p>\u5217\u5728\u9019\u908a\u7684plugin\u5047\u5982\u6c92\u6709\u5b89\u88dd\uff0c\u5247node\u4e0d\u6703\u555f\u52d5<\/p>\n<pre lang=\"bash\">################################### Memory ####################################\n\n# Elasticsearch performs poorly when JVM starts swapping: you should ensure that\n# it _never_ swaps.\n#\n# Set this property to true to lock the memory:\n#\n# bootstrap.mlockall: true<\/pre>\n<p>\u7576JVM\u958b\u59cb\u8a18\u61b6\u9ad4\u9032\u884cSWAP\u4ea4\u63db\u6642\uff0cElasticsearch\u7684\u6548\u80fd\u6703\u958b\u59cb\u8b8a\u5dee\uff0c\u6240\u4ee5\u5fc5\u9700\u8981\u78ba\u4fdd\u7d55\u5c0d\u4e0d\u6703\u9032\u884c\u8a18\u9ad4\u9ad4swap\u7684\u4ea4\u63db\u6a5f\u5236\u3002\u53c8\u6216\u8005\u662f\u8a2d\u5b9a\u8b93Elasticsearch\u4f7f\u7528\u7684\u8a18\u61b6\u9ad4\u7a7a\u9593\u9032\u884clock\u3002<\/p>\n<pre lang=\"bash\"># Make sure that the ES_MIN_MEM and ES_MAX_MEM environment variables are set\n# to the same value, and that the machine has enough memory to allocate\n# for Elasticsearch, leaving enough memory for the operating system itself.\n#\n# You should also make sure that the Elasticsearch process is allowed to lock\n# the memory, eg. by using `ulimit -l unlimited`.<\/pre>\n<p>\u78ba\u4fddES_MIN_MEM\u53caES_MAX_MEM\u7684\u74b0\u5883\u8b8a\u6578\u662f\u8a2d\u5b9a\u4e00\u6a23\u7684\u6578\u503c\uff0c\u5df2\u7d93\u4e3b\u6a5f\u6709\u8db3\u5920\u7684\u8a18\u61b6\u9ad4\u53ef\u4ee5\u5206\u914d\u7d66Elasticsearch\u4f7f\u7528\uff0c\u907f\u514d\u900f\u904e\u4f5c\u696d\u7cfb\u7d71\u9032\u884c\u8a18\u61b6\u9ad4\u7684\u8abf\u6574\u3002<br \/>\n\u4e5f\u8981\u78ba\u4fddElasticsearch\u5141\u8a31\u9396\u4f4f\u8a18\u61b6\u9ad4\uff0c\u4f8b\u5982\u4f7f\u7528<code>ulimit -l unlimited<\/code>\u6307\u4ee4\u7b49\u9032\u884c\u78ba\u8a8d\u3002<\/p>\n<pre lang=\"bash\">############################## Network And HTTP ###############################\n\n# Elasticsearch, by default, binds itself to the 0.0.0.0 address, and listens\n# on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node\n# communication. (the range means that if the port is busy, it will automatically\n# try the next port).<\/pre>\n<p>\u9810\u8a2d\u60c5\u6cc1\u4e0b\uff0cElasticsearch\u7d81\u5b9a\u7684\u662fIP\u4f4d\u7f6e0.0.0.0\u3001TCP\u57e09200~9300(\u63d0\u4f9bHTTP\u901a\u8a0a\u4f7f\u7528)\u53caTCP\u57e09300~9400(\u63d0\u4f9bCluster\u5404node\u901a\u8a0a\u4f7f\u7528)\uff0c\u7576\u767c\u73fe\u4f7f\u7528\u7684port\u88ab\u5360\u7528\u6642\uff0c\u6703\u76f4\u63a5\u4f7f\u7528\u4e0b\u4e00\u500bport\u3002<\/p>\n<pre lang=\"bash\"># Set the bind address specifically (IPv4 or IPv6):\n#\n# network.bind_host: 192.168.0.1<\/pre>\n<p>\u7279\u5225\u6307\u5b9a\u8981\u7d81\u5b9a\u7684IP\u4f4d\u7f6e<\/p>\n<pre lang=\"bash\"># Set the address other nodes will use to communicate with this node. If not\n# set, it is automatically derived. It must point to an actual IP address.\n#\n# network.publish_host: 192.168.0.1<\/pre>\n<p>\u8a2d\u5b9a\u7528\u4f86\u8ddf\u5176\u4ed6node\u9032\u884c\u901a\u8a0a\u7684ip\u4f4d\u7f6e\uff0c\u901a\u5e38\u6703\u81ea\u52d5\u8a2d\u5b9a\u3002\u9700\u8981\u7279\u5225\u6ce8\u610f\u7684\u662f\u9019\u500bip\u5fc5\u9808\u662f\u6709\u6548\u7684\u771f\u5be6ip<\/p>\n<pre lang=\"bash\"># Set both 'bind_host' and 'publish_host':\n#\n# network.host: 192.168.0.1<\/pre>\n<p>\u8a2d\u5b9anetwork.host\u53ef\u540c\u6642\u8a2d\u5b9apublish_host\u53cabind_host\u5169\u500b\u5c6c\u6027<\/p>\n<pre lang=\"bash\"># Set a custom port for the node to node communication (9300 by default):\n#\n# transport.tcp.port: 9300<\/pre>\n<p>\u8a2d\u5b9anode\u4e4b\u9593\u901a\u8a0a\u4f7f\u7528\u7684port<\/p>\n<pre lang=\"bash\"># Enable compression for all communication between nodes (disabled by default):\n#\n# transport.tcp.compress: true <\/pre>\n<p>\u8a2d\u5b9anode\u4e4b\u9593\u901a\u8a0a\u9700\u4e0d\u9700\u8981\u58d3\u7e2e\uff0c\u9810\u8a2d\u662f\u4e0d\u9032\u884c\u58d3\u7e2e<\/p>\n<pre lang=\"bash\"># Set a custom port to listen for HTTP traffic:\n#\n# http.port: 9200<\/pre>\n<p>\u8a2d\u5b9ahttp\u9810\u8a2d\u4f7f\u7528\u7684port<\/p>\n<pre lang=\"bash\"># Set a custom allowed content length:\n#\n# http.max_content_length: 100mb<\/pre>\n<p>\u5141\u8a31\u7684HTTP request\u6700\u5927\u503c [\u53c3\u8003 <a href=\"http:\/\/www.elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/modules-http.html\" title=\"Elasticsearch - Resources - http\" target=\"_blank\" rel=\"noopener noreferrer\">Elasticsearch &#8211; Resources &#8211; http<\/a>]<br \/>\n\u8a2d\u5b9a\u5141\u8a31\u7684index\u5927\u5c0f [\u6458\u9304\u81eaElasticsearch Server, 2nd Edition\u7b2c70\u9801]<br \/>\nThere is a default limitation on the size of the bulk indexing file, which is set to 100 megabytes and can be changed by specifying the http.max_content_length property in the Elasticsearch configuration file. This lets us avoid issues with possible request timeouts and memory problems when dealing with requests that are too large.<\/p>\n<pre lang=\"bash\"># Disable HTTP completely:\n#\n# http.enabled: false<\/pre>\n<p>\u8a2d\u5b9a\u662f\u5426\u4f7f\u7528 http \u6a21\u7d44<\/p>\n<pre lang=\"bash\">################################### Gateway ###################################\n\n# The gateway allows for persisting the cluster state between full cluster\n# restarts. Every change to the state (such as adding an index) will be stored\n# in the gateway, and when the cluster starts up for the first time,\n# it will read its state from the gateway.<\/pre>\n<p>\u6b64\u5340\u584a\u8a2d\u5b9a\u7528\u4f86\u5132\u5b58Cluster\u5167\u6240\u6709\u7d22\u5f15\u8cc7\u8a0a\uff0c\u5305\u542b\u7d22\u5f15\u7684\u8a2d\u7f6e\u53ca\u986f\u793a\u7684\u5c0d\u61c9\u8cc7\u8a0a\u3002\u7576cluster\u7684\u72c0\u614b\u767c\u751f\u6539\u8b8a\u6642(\u65b0\u589e\u3001\u522a\u9664\u7d22\u5f15)\u7686\u6703\u628a\u72c0\u614b\u5132\u5b58\u81f3gateway\u4e2d\uff0c\u800c\u7576Cluster\u7b2c\u4e00\u6b21\u555f\u52d5\u7684\u6642\u5019\uff0c\u6703\u5f9egateway\u4e2d\u8b80\u53d6\u76ee\u524d\u7684\u72c0\u614b\u8cc7\u8a0a\u3002<\/p>\n<pre lang=\"bash\"># There are several types of gateway implementations. For more information, see\n# <http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/modules-gateway.html>.<\/pre>\n<p>\u8a73\u7d30\u7684gateway\u5be6\u505a\u7bc4\u4f8b\u53ef\u4ee5\u53c3\u8003 <a href=\"http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/modules-gateway.html\" title=\"http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/modules-gateway.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/modules-gateway.html<\/a><\/p>\n<p>[\u6458\u9304\u81ea http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/modules-gateway.html ]<br \/>\nThe gateway module allows one to store the state of the cluster meta data across full cluster restarts. The cluster meta data mainly holds all the indices created with their respective (index level) settings and explicit type mappings.<br \/>\nEach time the cluster meta data changes (for example, when an index is added or deleted), those changes will be persisted using the gateway. When the cluster first starts up, the state will be read from the gateway and applied.<br \/>\nThe gateway set on the node level will automatically control the index gateway that will be used. For example, if the local gateway is used, then automatically, each index created on the node will also use its own respective index level local gateway. In this case, if an index should not persist its state, it should be explicitly set to none (which is the only other value it can be set to).<\/p>\n<pre lang=\"bash\"># The default gateway type is the \"local\" gateway (recommended):\n#\n# gateway.type: local<\/pre>\n<p>\u6b64\u8655\u9810\u8a2d\u7684gateway\u578b\u614b\u70balocal\uff0c\u4ee3\u8868node level\u4f7f\u7528local\uff0c\u5247index\u4ea6\u6703\u4f7f\u7528local\u8a2d\u5b9a\uff0c\u5373\u6703\u5c07\u72c0\u614b\u9032\u884c\u6c38\u4e45\u4fdd\u5b58\uff1b\u53cd\u4e4b\uff0c\u82e5\u72c0\u614b\u4e0d\u9700\u6c38\u4e45\u4fdd\u5b58\uff0c\u53ef\u4ee5\u8a2d\u5b9a\u70banone\u3002<\/p>\n<pre lang=\"bash\"># Settings below control how and when to start the initial recovery process on\n# a full cluster restart (to reuse as much local data as possible when using shared\n# gateway).<\/pre>\n<p>\u5f8c\u7e8c\u4e3b\u8981\u662f\u8a2d\u5b9a\u5728\u54ea\u4e9b\u6642\u5019\u6703\u5982\u4f55\u958b\u59cb\u4e00\u500b\u5b8c\u6574cluster\u91cd\u65b0\u555f\u52d5\u521d\u59cb\u5316\u7684\u5fa9\u539f\u7a0b\u5e8f\uff0c\u5df2\u9054\u6210\u5728\u4f7f\u7528shared gateway\u6642\u5118\u53ef\u80fd\u91cd\u65b0\u4f7f\u7528\u672c\u5730\u7aef\u7684\u8cc7\u6599<\/p>\n<pre lang=\"bash\"># Allow recovery process after N nodes in a cluster are up:\n#\n# gateway.recover_after_nodes: 1<\/pre>\n<p>\u8a2d\u5b9a\u7576cluster\u555f\u52d5\u5fa9\u539f\u7a0b\u5e8f\u6642\u81f3\u5c11\u9700\u8981\u5e7e\u5404node<\/p>\n<pre lang=\"bash\"># Set the timeout to initiate the recovery process, once the N nodes\n# from previous setting are up (accepts time value):\n#\n# gateway.recover_after_time: 5m<\/pre>\n<p>\u8a2d\u5b9a\u5fa9\u539f\u7a0b\u5e8f\u521d\u59cb\u5316\u7684\u7b49\u5f85\u6642\u9593\uff0c\u7576node\u8d77\u4f86\u5f8c\u7b49\u5f85\u591a\u4e45\u6642\u9593\u5728\u555f\u52d5\u5fa9\u539f\u7a0b\u5e8f<\/p>\n<pre lang=\"bash\"># Set how many nodes are expected in this cluster. Once these N nodes\n# are up (and recover_after_nodes is met), begin recovery process immediately\n# (without waiting for recover_after_time to expire):\n#\n# gateway.expected_nodes: 2<\/pre>\n<p>\u8a2d\u5b9a\u7576\u591a\u5c11node\u555f\u52d5\u5f8c\uff0ccluster\u5373\u555f\u52d5\u5fa9\u539f\u7a0b\u5e8f\uff0c\u524d\u5217\u7684recover_after_time\u8a2d\u5b9a\u6703\u81ea\u52d5\u5ffd\u7565\uff0c\u6b64\u8655\u7684node\u5305\u542bmaster\u53cadata node\u3002<\/p>\n<pre lang=\"bash\">############################# Recovery Throttling #############################\n\n# These settings allow to control the process of shards allocation between\n# nodes during initial recovery, replica allocation, rebalancing,\n# or when adding and removing nodes.<\/pre>\n<p>\u6b64\u8655\u7684\u8a2d\u5b9a\u70ba\u7576\u5fa9\u539f\u521d\u59cb\u5316\u3001\u8907\u672c\u5206\u914d\u3001\u91cd\u65b0\u8ca0\u8f09\u5e73\u8861\u6216\u662f\u65b0\u589e\u79fb\u9664\u7bc0\u9ede\u6642\uff0c\u5404\u7bc0\u9ede\u4e4b\u9593\u5141\u8a31shards\u5206\u914d\u7684\u63a7\u5236\u6a5f\u5236\u3002<\/p>\n<pre lang=\"bash\"># Set the number of concurrent recoveries happening on a node:\n#\n# 1. During the initial recovery\n#\n# cluster.routing.allocation.node_initial_primaries_recoveries: 4\n#\n# 2. During adding\/removing nodes, rebalancing, etc\n#\n# cluster.routing.allocation.node_concurrent_recoveries: 2<\/pre>\n<p>\u7576\u521d\u59cb\u5316\u5fa9\u539f\u6642\uff0c\u8a2d\u5b9a\u4e00\u500bnode\u4e0a\u7684\u4e3b\u8981shards\u6578\u76ee<br \/>\n\u7576\u65b0\u589e\u3001\u79fb\u9664node\u53ca\u91cd\u65b0\u8ca0\u8f09\u5e73\u8861\u6642\uff0c\u4e00\u500bnode\u4e0a\u7684shards\u6578\u76ee<\/p>\n<pre lang=\"bash\"># Set to throttle throughput when recovering (eg. 100mb, by default 20mb):\n#\n# indices.recovery.max_bytes_per_sec: 20mb<\/pre>\n<p>\u8a2d\u5b9a\u5fa9\u539f\u6642\u7684\u541e\u5410\u91cf\u9650\u5236<\/p>\n<pre lang=\"bash\"># Set to limit the number of open concurrent streams when\n# recovering a shard from a peer:\n#\n# indices.recovery.concurrent_streams: 5<\/pre>\n<p>\u8a2d\u5b9a\u5fa9\u539f\u6642\uff0c\u540c\u6642\u9593\u4e00\u500bnode\u4e0a\u53ef\u4ee5\u958b\u8d77\u5e7e\u5404stream<\/p>\n<pre lang=\"bash\">################################## Discovery ##################################\n\n# Discovery infrastructure ensures nodes can be found within a cluster\n# and master node is elected. Multicast discovery is the default.<\/pre>\n<p>discovery\u6a21\u7d44\u4e3b\u8981\u662f\u70ba\u4e86\u78ba\u4fdd\u6bcf\u4e00\u500bcluster\u4e2d\u7684node\u90fd\u80fd\u5920\u88ab\u5c0b\u627e\u5230\u4e26\u4e14\u4e5f\u80fd\u9078\u51famaster node\u3002\u9810\u8a2d\u662f\u4ee5multicast\u9032\u884c<\/p>\n<pre lang=\"bash\"># Set to ensure a node sees N other master eligible nodes to be considered\n# operational within the cluster. Its recommended to set it to a higher value\n# than 1 when running more than 2 nodes in the cluster.\n#\n# discovery.zen.minimum_master_nodes: 1<\/pre>\n<p>\u8a2d\u5b9acluster\u4e2dmaster node\u7684\u5404\u6578\uff0c\u7576cluster\u4e2d\u7684nodes\u6578\u76ee\u589e\u52a0\u6642\uff0c\u5efa\u8b70\u53ef\u4ee5\u8a2d\u5b9a\u8d85\u904e\u9810\u8a2d1\u7684\u8a2d\u5b9a\u503c<\/p>\n<pre lang=\"bash\"># Set the time to wait for ping responses from other nodes when discovering.\n# Set this option to a higher value on a slow or congested network\n# to minimize discovery failures:\n#\n# discovery.zen.ping.timeout: 3s<\/pre>\n<p>\u8a2d\u5b9a\u7576\u9032\u884cdiscovery\u6642\uff0cping\u56de\u61c9\u7684timeout\u6642\u9593\uff0c\u7576\u7db2\u8def\u74b0\u5883\u4e0d\u512a\u7684\u60c5\u6cc1\u4e0b\uff0c\u9700\u8981\u9069\u5ea6\u589e\u52a0\u8a2d\u5b9a\u503c<\/p>\n<pre lang=\"bash\"># For more information, see\n# <http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/modules-discovery-zen.html><\/pre>\n<p>\u66f4\u591a\u7684\u8cc7\u8a0a\u53ef\u4ee5\u53c3\u8003 http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/modules-discovery-zen.html<\/p>\n<pre lang=\"bash\"># Unicast discovery allows to explicitly control which nodes will be used\n# to discover the cluster. It can be used when multicast is not present,\n# or to restrict the cluster communication-wise.<\/pre>\n<p>#<\/p>\n<p>\u7576\u4e0d\u540c\u7db2\u6bb5\u6642\u6703\u5c0e\u81f4multicast\u7121\u6cd5\u6b63\u5e38\u9032\u884cdiscovery\uff0c\u9019\u6642\u53ef\u4ee5\u4f7f\u7528\u6307\u5b9acluster\u76ee\u6a19\u7684unicast\u9032\u884cdiscovery<\/p>\n<pre lang=\"bash\"># 1. Disable multicast discovery (enabled by default):\n#\n# discovery.zen.ping.multicast.enabled: false<\/pre>\n<p>#<\/p>\n<p>\u662f\u5426\u8981\u95dc\u9589\u4ee5multicast\u9032\u884cdiscovery\u7684\u529f\u80fd\uff0c\u9810\u8a2d\u60c5\u6cc1\u4e0b\u662f\u555f\u52d5\u7684<\/p>\n<pre lang=\"bash\"># 2. Configure an initial list of master nodes in the cluster\n#    to perform discovery when new nodes (master or data) are started:\n#\n# discovery.zen.ping.unicast.hosts: [\"host1\", \"host2:port\"]<\/pre>\n<p>\u9019\u88e1\u91dd\u5c0dunicast\u8a2d\u5b9acluster\u7684master\u6e05\u55ae\uff0c\u53ef\u4ee5\u8a2d\u5b9a\u591a\u7b46\uff0c\u4ea6\u53ef\u4ee5\u6307\u5b9a\u4e0d\u540c\u7684port<\/p>\n<pre lang=\"bash\"># EC2 discovery allows to use AWS EC2 API in order to perform discovery.\n#\n# You have to install the cloud-aws plugin for enabling the EC2 discovery.\n#\n# For more information, see\n# <http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/modules-discovery-ec2.html>\n#\n# See <http:\/\/elasticsearch.org\/tutorials\/elasticsearch-on-ec2\/>\n# for a step-by-step tutorial.<\/pre>\n<p>\u9019\u90e8\u5206\u4e3b\u8981\u91dd\u5c0daws ex2\u9032\u884c\u8aaa\u660e\uff0c\u53ef\u4ee5\u984d\u5916\u5b89\u88ddcloud-aws\u4f7f\u5f97\u80fd\u5728ec2\u74b0\u5883\u9032\u884cdiscovery<br \/>\n\u8a73\u7d30\u8aaa\u660e\u53ef\u4ee5\u53c3\u8003 http:\/\/elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/modules-discovery-ec2.html \u53ca http:\/\/elasticsearch.org\/tutorials\/elasticsearch-on-ec2\/<\/p>\n<pre lang=\"bash\"># GCE discovery allows to use Google Compute Engine API in order to perform discovery.\n#\n# You have to install the cloud-gce plugin for enabling the GCE discovery.\n#\n# For more information, see <https:\/\/github.com\/elasticsearch\/elasticsearch-cloud-gce>.<\/pre>\n<p>\u4ea6\u53ef\u4ee5\u9032\u884cGoogle compute engine\u7684discovery\uff0c\u8a73\u60c5\u8acb\u53c3\u8003 https:\/\/github.com\/elasticsearch\/elasticsearch-cloud-gce<\/p>\n<pre lang=\"bash\"># Azure discovery allows to use Azure API in order to perform discovery.\n#\n# You have to install the cloud-azure plugin for enabling the Azure discovery.\n#\n# For more information, see <https:\/\/github.com\/elasticsearch\/elasticsearch-cloud-azure>.<\/pre>\n<p>\u4ea6\u53ef\u4ee5\u9032\u884cAzure\u7684discovery\uff0c\u8a73\u60c5\u8acb\u53c3\u8003 https:\/\/github.com\/elasticsearch\/elasticsearch-cloud-azure<\/p>\n<pre lang=\"bash\">################################## Slow Log ##################################\n\n# Shard level query and fetch threshold logging.<\/pre>\n<p>\u9019\u90e8\u5206\u4e3b\u8981\u662fshard log\u5404\u7a2e\u72c0\u614b\u9032\u884c\u8a18\u9304query\u3001fetch\u3001index\u6642\u9593\u6642\u4f7f\u7528\u7684\u8cc7\u8a0a\uff0c\u72c0\u614b\u53ef\u5206\u70ba\u56db\u7a2e{warn\u3001info\u3001debug\u3001trace}\uff0c\u800c\u9805\u76ee\u6709\u4e09\u500b\uff0c\u5206\u5225\u662fquery\u3001fetch\u3001index<br \/>\n\u800c\u91dd\u5c0dlog\u7684\u555f\u7528\u8a2d\u5b9a\u8981\u770blogging.xml\u6a94\u6848<\/p>\n<pre lang=\"bash\">#index.search.slowlog.threshold.query.warn: 10s\n#index.search.slowlog.threshold.query.info: 5s\n#index.search.slowlog.threshold.query.debug: 2s\n#index.search.slowlog.threshold.query.trace: 500ms\n\n#index.search.slowlog.threshold.fetch.warn: 1s\n#index.search.slowlog.threshold.fetch.info: 800ms\n#index.search.slowlog.threshold.fetch.debug: 500ms\n#index.search.slowlog.threshold.fetch.trace: 200ms\n\n#index.indexing.slowlog.threshold.index.warn: 10s\n#index.indexing.slowlog.threshold.index.info: 5s\n#index.indexing.slowlog.threshold.index.debug: 2s\n#index.indexing.slowlog.threshold.index.trace: 500ms<\/pre>\n<pre lang=\"bash\">################################## GC Logging ################################\n\n#monitor.jvm.gc.young.warn: 1000ms\n#monitor.jvm.gc.young.info: 700ms\n#monitor.jvm.gc.young.debug: 400ms\n\n#monitor.jvm.gc.old.warn: 10s\n#monitor.jvm.gc.old.info: 5s\n#monitor.jvm.gc.old.debug: 2s<\/pre>\n<p>\u9019\u90e8\u5206\u4e3b\u8981\u662fGC\u57283\u7a2e\u72c0\u614b\u9032\u884c\u8a18\u9304query\u3001fetch\u3001index\u6642\u9593\u6642\u4f7f\u7528\u7684\u8cc7\u8a0a\uff0c\u72c0\u614b\u53ef\u5206\u70ba\u56db\u7a2e{warn\u3001info\u3001debug\u3001trace}\uff0c\u800c\u9805\u76ee\u6709\u4e09\u500b\uff0c\u5206\u5225\u662fquery\u3001fetch\u3001index<br \/>\n\u800c\u91dd\u5c0dlog\u7684\u555f\u7528\u8a2d\u5b9a\u8981\u770blogging.xml\u6a94\u6848<\/p>\n","protected":false},"excerpt":{"rendered":"<p>##################### Elasticsearch Configuration Example ##################### # This file contains an overview of various configuration settings, # targeted at operations staff. Application developers should # consult the guide at . \u8aaa\u660e\u6b64\u6a94\u6848\u5305\u542b\u591a\u500b\u8a2d\u5b9a\u7684\u90e8\u4efd\uff0c\u53ef\u4ee5\u81f3 Elasticsearch Guide \u89c0\u770b\u8aaa\u660e # # The installation procedure is covered &hellip; <a href=\"https:\/\/cowmanchiang.me\/wp\/?p=1308\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[],"class_list":["post-1308","post","type-post","status-publish","format-standard","hentry","category-elasticsearch"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1308","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1308"}],"version-history":[{"count":1,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1308\/revisions"}],"predecessor-version":[{"id":1957,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1308\/revisions\/1957"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}