elasticsearch-1.5.2 生产环境配置文件(Elasticsearch.xml)集群配置,下面是具体内容。为了方便查看,其它注释已经去掉。
##################### Elasticsearch Configuration Example #####################
#node.rack: ${RACK_ENV_VAR}
################################### Cluster ###################################
cluster.name: TEST
#################################### Node #####################################
node.name: "test_node_1_31"
node.master: true
node.data: true
#node.master: false
#node.data: true
#node.master: true
#node.data: false
#node.master: false
#node.data: false
node.rack: rack31
#node.max_local_storage_nodes: 1
#################################### Index ####################################
#index.number_of_shards: 5
#index.number_of_replicas: 1
#index.number_of_shards: 1
#index.number_of_replicas: 0
#################################### Paths ####################################
#path.conf: config
path.data: /home/kxjr/fin/workspace/elasticsearch/elasticsearch-1.5.2/data
#path.data: /path/to/data1,/path/to/data2
#path.work: work
path.logs: /home/kxjr/fin/workspace/elasticsearch/elasticsearch-1.5.2/logs
#path.plugins: plugins
#################################### Plugin ###################################
#plugin.mandatory: mapper-attachments,lang-groovy
################################### Memory ####################################
bootstrap.mlockall: true
############################## Network And HTTP ###############################
#network.bind_host: 192.168.0.1
#network.publish_host: 192.168.0.1
#network.host: 192.168.0.1
transport.tcp.port: 9300
transport.tcp.compress: true
http.port: 9200
http.max_content_length: 20mb
http.enabled: true
################################### Gateway ###################################
gateway.type: local
#gateway.recover_after_nodes: 1
#gateway.recover_after_time: 5m
#gateway.expected_nodes: 2
############################# Recovery Throttling #############################
#cluster.routing.allocation.node_initial_primaries_recoveries: 4
#cluster.routing.allocation.node_concurrent_recoveries: 2
#indices.recovery.max_bytes_per_sec: 20mb
#indices.recovery.concurrent_streams: 5
################################## Discovery ##################################
#discovery.zen.minimum_master_nodes: 1
#discovery.zen.ping.timeout: 10s
#discovery.zen.ping.multicast.enabled: false
#discovery.zen.ping.unicast.hosts: ["host1", "host2:port"]
################################## 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 you want to enable JSONP as a valid return transport on the
# http server. With this enabled, it may pose a security risk, so disabling
# it unless you need it is recommended (it is disabled by default).
#
#http.jsonp.enable: true
#byWangsl_150601
analysis:
analyzer:
ik:
alias: [ik_analyzer]
type: org.elasticsearch.index.analysis.IkAnalyzerProvider
ik_max_word:
type: ik
use_smart: false
ik_smart:
type: ik
use_smart: true