Configuring the Elasticsearch for a cluster

This topic describes how to configure the Elasticsearch for a cluster environment.

To configure the Elasticsearch for a cluster environment:
  1. After you setup the Elasticsearch service, browse to the folder where you have installed the Elasticsearch.
  2. Edit the following properties in the elasticsearch.yml file, located in the elasticsearch-7.16.2/config/ folder:
    Note: This topic describes folder paths according to the latest supported Elasticsearch version.
    Property Name Value Comments
    cluster.initial_master_nodes IP address:TransportPort The IP address:TransportPort of the initial master node information in an array format.

    For example, ["192.168.56.1:9300"].

    cluster.name es-cluster By default, the application uses cluster.name =es-cluster.
    Important: If you modify the value of the cluster.name property, you must also update the cluster name in the newui_env_settings.ini file.
    discovery.seed.hosts IP address:TransportPort The IP address:TransportPort of the self node and other nodes in an array format. For example,
    discovery.seed_hosts: ["192.168.56.1:9300", "192.168.56.1:9310"]
    http.port HTTP port The HTTP port, "http.port".
    indices.query.bool.max_clause_count 10000 Maximum number of clauses a Lucene BooleanQuery can contain.
    network.host Host IP address The IP address of the host to make Elasticsearch service accessible from other workstations in the network.
    node.master true Set current node as the master node. By default, the value is true.
    node.name Node name The descriptive name for the node.
    path.data <Elasticsearch_Parent _Folder>\data The file path where the Elasticsearch stores the data.
    • Windows - D:\elasticsearch-7.16.2\data
    • Linux - /tmp/elasticsearch-7.16.2/data
    path.logs <Elasticsearch_Parent _Folder>\logs The file path where the Elasticsearch logs are generated.
    • Windows - D:\elasticsearch-7.16.2\logs
    • Linux - /tmp/elasticsearch-7.16.2/logs
    transport.port TCP port The TCP port.
    xpack.ml.enabled false The machine learning engine used by the Elasticsearch. By default, the value is false.
  3. Restart the Elasticsearch service for changes to take effect.
  4. Verify that the search service is running through the following URL: http://localhost:9200/. The URL should return JSON response and the value of the cluster_name should match the value that is specified for the cluster.name property in the elasticsearch.yml file.