##################### Elasticsearch Configuration Example #####################
# This file contains a overview of various configuration settings,
# Targeted at operations staff. Application developers should
# Consult the guide at
#
# The installation procedure is covered at
#
#
# Elasticsearch comes with reasonable defaults for most settings,
# so can-try it out without bothering with configuration.
#
# Most of the time, these defaults is just fine for running a production
# cluster. If you ' re fine-tuning your cluster, or wondering about the
# Effect of certain configuration option, _do ask_ on the
# mailing list or IRC Channel [http://elasticsearch.org/community].
# any element in the configuration can is replaced with environment variables
# by placing them in ${...} notation. For example:
#
#node. Rack: ${rack_env_var}
# for information in supported formats and syntax for the config file, see
#
################################### Cluster ###################################
# Cluster Name identifies your Cluster for auto-discovery. If you ' re running
# Multiple clusters on the same network, make sure you ' re using unique names.
#
Cluster.name:liushihua//Cluster name
#################################### Node #####################################
# Node names is generated dynamically on startup, so you ' re relieved
# from configuring them manually. You can tie this node to a specific name:
#
Node.name: "Node1"//Current node name
# every node can configured to allow or deny being eligible as the master,
# and to, or deny to store the data.
#
# Allow this node to being eligible as a master node (enabled by default):
#
Node.master:true//Set current node as primary node it is responsible for scheduling algorithm assignment
#
# Allow this node to store data (enabled by default):
#
Node.data:true//Current node whether to store index data
# You can exploit these settings-to-design advanced cluster topologies.
#
# 1. You want this node to never become a master node, and only to the hold data.
# This'll be the "workhorse" of your cluster.
#
#node. Master:false
#node. data:true
#
# 2. You want the this node to only serve as a master:to not the store any data and
# to has the free resources. This would be the "coordinator" of your cluster.
#
#node. master:true
#node. Data:false
#
# 3. You want this node to being neither master nor data node, but
# to act as a ' search load balancer ' (fetching data from nodes,
# aggregating results, etc.)
#
#node. Master:false
#node. Data:false
# Use the Cluster health API [Http://localhost:9200/_cluster/health], the
# Node Info API [http://localhost:9200/_nodes] or GUI tools
# such as
#
#
#
# A node can has generic attributes associated with it, which can later be used
# for customized shard allocation filtering, or allocation awareness. An attribute
# is a simple key value pair, similar to Node.key:value, this is an example:
#
#node. rack:rack314
# By default, multiple nodes is allowed to start from the same installation location
# To disable it, set the following:
#node. max_local_storage_nodes:1
#################################### Index ####################################
# you can set a number of options (such as Shard/replica options, mapping
# or analyzer definitions, translog settings, ...) For indices globally,
# in the This file.
#
# Note, that's it makes more sense to configure index settings specifically for
# A certain index, either when creating it or by using the index templates API.
#
# See
#
# for more information.
# Set The number of shards (splits) of an index (5 by default):
#
Index.number_of_shards:5//Set the current number of shards
# Set The number of replicas (additional copies) of an index (1 by default):
#
Index.number_of_replicas:1//Set the current number of replicas
# Note, that for development on a local machine, with small indices, it usually
# Makes sense to "disable" the Distributed features:
#
#index. number_of_shards:1
#index. number_of_replicas:0
# These settings directly affect the performance of index and search operations
# in your cluster. Assuming you has enough machines to hold shards and
# replicas, the rule of thumb is:
#
# 1. Have more *shards* enhances the _indexing_ performance and allows to
# _distribute_ a big index across machines.
# 2. Have more *replicas* enhances the _search_ performance and improves the
# cluster _availability_.
#
# the "Number_of_shards" is a one-time setting for an index.
#
# the "Number_of_replicas" can be increased or decreased anytime,
# by using the Index Update Settings API.
#
# Elasticsearch takes care about load balancing, relocating, gathering the
# results from nodes, etc. Experiment with different settings to fine-tune
# your setup.
# Use the Index Status API (
# The index status.
#################################### Paths ####################################
Common configuration path settings Generally, we're going to set up a little bit.
# Path to directory containing configuration (this file and logging.yml):
#
path.conf:/usr/local/elasticsearch-1.7.2/conf//elasticsearch configuration file storage location
# Path to directory, where to store, index data allocated for this node.
#
Path.data: /usr/local/elasticsearch-1.7.2/data//Index data storage path
#
# Can optionally include more than one location, causing data to be striped across
# The locations (a la RAID 0) on a file level, favouring locations with most free
# space on creation. For example:
#
#path. Data:/path/to/data1,/path/to/data2
# Path to Temporary files:
#
Path.work: /usr/local/elasticsearch-1.7.2/work//temporary file storage path
# Path to log files:
#
Path.logs: /usr/local/elasticsearch-1.7.2/logs//log file storage location
# Path to where plugins is installed:
#
Path.plugins: /usr/local/elasticsearch-1.7.2/plugins//plug-in storage location
#################################### Plugin ###################################
# If A plugin listed here's isn't installed for current node, the node would not start.
#
#plugin. Mandatory:mapper-attachments,lang-groovy
################################### Memory ####################################
# Elasticsearch performs poorly when JVM starts swapping:you should ensure that
# It _never_ swaps.
#
# Set This property to True to lock the memory:
#
Bootstrap.mlockall:true//Lock memory
# Make sure, the ES_MIN_MEM and ES_MAX_MEM environment variables are set
# to the same value, and that of the machine have enough memory to allocate
# for Elasticsearch, leaving enough memory for the operating system itself.
#
# should also make sure, the Elasticsearch process is allowed to lock
# the memory, eg. By using ' Ulimit-l unlimited '.
############################## Network and HTTP ###############################
# Elasticsearch, by default, binds itself to the 0.0.0.0 address, and listens
# on port [9200-9300] for HTTP traffic and on port [9300-9400] for Node-to-node
# communication. (The range means if the port is busy, it'll automatically
# try the next port).
# Set The bind address specifically (IPV4 or IPV6):
#
#network. bind_host:192.168.0.1
# Set The address other nodes would use to communicate with this node. If not
# set, it is automatically derived. It must a actual IP address.
#
#network. publish_host:192.168.0.1
# Set both ' bind_host ' and ' publish_host ':
#
#network. host:192.168.0.1
# Set a custom port for the node to node communication (9300 by default):
#
TRANSPORT.TCP.PORT:9300 communication ports between the various hosts
# Enable compression for all communication between nodes (disabled by default):
#
Transport.tcp.compress:true compressed data While the network is transmitting
# Set a custom port to listen for HTTP traffic:
#
http.port:9200 External Access Port 9200
# Set A custom allowed content length:
#
#http. MAX_CONTENT_LENGTH:100MB
# Disable HTTP completely:
#
#http. Enabled:false
################################### Gateway ###################################
# The gateway allows for persisting the cluster state between full cluster
# restarts. Every such as adding an index) 'll be stored
# in the gateway, and when the cluster starts
# It would read its state from the gateway.
# There is several types of the gateway implementations. For more information, see
#
# The default gateway type is the "local" Gateway (recommended):
#
#gateway. type:local
# Settings below control how and if to start the initial recovery process on
# a full cluster restart (to reuse as much local data as possible when using shared
# Gateway).
# Allow recovery process after N nodes in a cluster is up:
#
#gateway. recover_after_nodes:1
# Set The timeout to initiate the recovery process, once the N nodes
# from previous setting is up (accepts time value):
#
#gateway. recover_after_time:5m
# Set How many nodes is expected in this cluster. Once these N nodes
# was up (and Recover_after_nodes is met), begin recovery process immediately
# (without waiting for recover_after_time to expire):
#
#gateway. Expected_nodes:2
############################# Recovery Throttling #############################
# These settings allow to control the process of shards allocation between
# nodes during initial recovery, replica allocation, rebalancing,
# or when adding and removing nodes.
# Set The number of concurrent recoveries happening on a node:
#
# 1. During the initial recovery
#
#cluster. routing.allocation.node_initial_primaries_recoveries:4
#
# 2. During adding/removing nodes, rebalancing, etc
#
#cluster. Routing.allocation.node_concurrent_recoveries:2
# Set to throttle throughput if recovering (eg. 100mb, by default 20MB):
#
#indices. RECOVERY.MAX_BYTES_PER_SEC:20MB
# Set to limit the number of open concurrent streams when
# Recovering a shard from a peer:
#
#indices. Recovery.concurrent_streams:5
################################## Discovery ##################################
# Discovery infrastructure ensures nodes can be found within a cluster
# and Master node is elected. Multicast discovery is the default.
# Set to ensure a node sees N other master eligible nodes to be considered
# Operational within the cluster. This should BES set to a quorum/majority of
# The Master-eligible nodes in the cluster.
#
#discovery. zen.minimum_master_nodes:1
# Set the time to wait for ping responses from other nodes when discovering.
# Set This option to a higher value on a slow or congested network
# To minimize discovery failures:
#
#discovery. zen.ping.timeout:3s
# For more information, see
#
# Unicast discovery allows to explicitly control which nodes would be used
# to discover the cluster. It can used when multicast are not present,
# or to restrict the cluster communication-wise.
#
# 1. Disable Multicast discovery (enabled by default):
#
#discovery. Zen.ping.multicast.enabled:false
#
# 2. Configure an initial list of master nodes in the cluster
# To perform discovery when new nodes (master or data) is started:
#
#discovery. Zen.ping.unicast.hosts: ["host1", "Host2:port"]
# EC2 Discovery allows to the use of AWS EC2 API in order to perform discovery.
#
# You has to install the Cloud-aws plugin for enabling the EC2 discovery.
#
# For more information, see
#
#
# See
# for a step-by-step tutorial.
# GCE Discovery allows to the use of Google Compute Engine API in order to perform discovery.
#
# You has to install the CLOUD-GCE plugin for enabling the GCE discovery.
#
# For more information, see
# Azure Discovery allows to the use of Azure API in order to perform discovery.
#
# You has to install the Cloud-azure plugin for enabling the Azure discovery.
#
# For more information, see
################################## Slow Log ##################################
# Shard level Query and fetch threshold logging.
#index. search.slowlog.threshold.query.warn:10s
#index. search.slowlog.threshold.query.info:5s
#index. search.slowlog.threshold.query.debug:2s
#index. search.slowlog.threshold.query.trace:500ms
#index. search.slowlog.threshold.fetch.warn:1s
#index. search.slowlog.threshold.fetch.info:800ms
#index. search.slowlog.threshold.fetch.debug:500ms
#index. search.slowlog.threshold.fetch.trace:200ms
#index. indexing.slowlog.threshold.index.warn:10s
#index. indexing.slowlog.threshold.index.info:5s
#index. indexing.slowlog.threshold.index.debug:2s
#index. indexing.slowlog.threshold.index.trace:500ms
################################## GC Logging ################################
#monitor. jvm.gc.young.warn:1000ms
#monitor. jvm.gc.young.info:700ms
#monitor. jvm.gc.young.debug:400ms
#monitor. jvm.gc.old.warn:10s
#monitor. jvm.gc.old.info:5s
#monitor. jvm.gc.old.debug:2s
################################## Security ################################
# uncomment if want to enable JSONP as a valid return transport on the
# HTTP Server. With this enabled, it could pose a security risk, so disabling
# It unless need it is recommended (it's disabled by default).
#
#http. jsonp.enable:true
ELASTICSEARCH.YML Basic Configuration Instructions