Setting up a node
ElasticSearch allows you to customize several parameters in an installation. In this recipe, we'll see the most-used ones in order to define where to store data and improve performance in general.
Getting ready
You need a working ElasticSearch installation.
How to do it...
Perform the following steps to set up a simple node:
Open the
config/elasticsearch.yml
file with an editor of your choice.Set up the directories that store your server data:
For Linux or Mac OS X:
path.conf: /opt/data/es/conf path.data: /opt/data/es/data1,/opt2/data/data2 path.work: /opt/data/work path.logs: /opt/data/logs path.plugins: /opt/data/plugins
For Windows:
path.conf: c:\Elasticsearch\conf path.data: c:\Elasticsearch\data path.work: c:\Elasticsearch\work path.logs: c:\Elasticsearch\logs path.plugins: c:\Elasticsearch\plugins
Set up parameters to control the standard index creation. These parameters are:
index.number_of_shards: 5 index.number_of_replicas: 1
How it works...
The
path.conf
parameter defines...