OpenSearch configuration

    Whenever possible, use the cluster settings API instead; opensearch.yml is local to each node, whereas the API applies the setting to all nodes in the cluster. Certain settings, however, require opensearch.yml. In general, these settings relate to networking, cluster formation, and the local file system. To learn more, see Cluster formation.

    The first step in changing a setting is to view the current settings:

    For a more concise summary of non-default settings:

    If you specify the same setting in multiple places, OpenSearch uses the following precedence:

    1. Transient settings
    2. Settings from opensearch.yml

    To change a setting, just specify the new one as either persistent or transient. This example shows the flat settings form:

    You can also use the expanded form, which lets you copy and paste from the GET response and change existing values:


    Configuration file

    You can edit the OPENSEARCH_PATH_CONF=/etc/opensearch to change the config directory location. This variable is sourced from (Debian package) and /etc/sysconfig/opensearch(RPM package).

    If you set your customized OPENSEARCH_PATH_CONF variable, be aware that other default environment variables will not be loaded.

    You don’t mark settings in opensearch.yml as persistent or transient, and settings use the flat form: