What is the config location of elastic search? Where should the synonyms file be placed? What is the config location of elastic search? Where should the synonyms file be placed? elasticsearch elasticsearch

What is the config location of elastic search? Where should the synonyms file be placed?


You can place synonyms file in path relative to the config location.

You can have a look at Directory layout of your ES setup.It contains a config folder where you can place your synonym file and then specify relative path of that file.

For Example

    "filter" : {                "synonym" : {                    "type" : "synonym",                    "synonyms_path" : "analysis/synonym.txt"                }            }

The above configures a synonym filter, with a path of analysis/synonym.txt (relative to the config location).

See this for more detail

EDIT:

You can also specify absolute path. As per doc

The path to the synonyms file should be specified with the synonyms_path parameter, and should be either absolute or relative to the Elasticsearch config directory.

Refer this