Logstash output to elasticsearch - how to include external synonims file?

I am using Logstash to output a big CSV file inside an ElasticSearch index and I need to include a SOLR synonims external file (https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html) into account when indexing.

I see that when the index is done directly from ElasticSeaarch Indices API , this operation can be done by specifying the synonim file path in the index configuration JSON, something like :

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

But I can't find anywhere how can I include the same file from the logstash config file when indexing from Logstash

I searched in official documentation, but I can't find any useful hint :

https://www.elastic.co/guide/en/logstash/5.3/plugins-outputs-elasticsearch.html

Any idea on how to achieve this ?

The file can't be supplied via the REST API (i.e. Logstash can't supply it). It must reside on the Elasticsearch server's file system.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.