Configuring Elasticsearch

You can configure the Elasticsearch on a single node or across multi-nodes.

Procedure

  1. Browse to the elasticsearch-7.17.1/config folder.
  2. Edit the following properties in the elasticsearch-7.17.1/config/elasticsearch.yml file.
    cluster.name
    The name of the cluster.
    By default, the application uses cluster.name =es-cluster.
    If you modify the value of the cluster.name property, you must also update the elastic_cluster_name property in the env_settings.ini file.
    node.name
    The descriptive name for the node.
    indices.query.bool.max_clause_count
    Maximum number of clauses a Lucene BooleanQuery can contain. Update the value to 10000.
    network.host
    The IP address of the host to make Elasticsearch service accessible from other workstations in the network.
    path.data
    The file path where the Elasticsearch stores the data.
    data folder in the <elasticsearch installation directory>
    path.logs
    The file path where the Elasticsearch logs are generated.
    logs folder in the <elasticsearch installation directory>
    http.port
    The HTTP port, "http.port".
    transport.port
    The TCP port.
    discovery.type
    The Elasticsearch node elects itself as master and does not join a cluster with any other node. For more information, see Single-node discovery.
    transport.compress
    Enable compression on the Elasticsearch response. By default, the value is true.
    cluster.initial_master_nodes
    The IP address:TransportPort of the initial master node information in an array format. For example, ["IP address:TransportPort"].
    discovery.seed.hosts
    The IP address:TransportPort of the self-node and other nodes in an array format. For example,
    discovery.seed_hosts: ["IP address:TransportPort"], ["IP address:TransportPort1"]
  3. Restart the Elasticsearch service for changes to take effect.