How to handle Synonym files in elasticsearch Elastic Cloud

738 views Asked by At

We have the requirement that we have to maintain multiple synonym files as token filter for an index.

But how do I do that in Azure managed Elatic Cloud Service?

I saw in the documentation (https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html) that it is generally posssible to add synonym file/s to an index. But therefore you have to upload a file. This is not possilbe, or at least I don't know how to do so in Azure Managed Elastic Cloud Service.

1

There are 1 answers

6
Val On

On Elastic Cloud, you can create a bundle containing your synonym file and upload it as an extension.

You synonym file needs to be placed in a /dictionaries folder at the root of the ZIP bundle

/dictionaries
  +-- synonyms.txt

When zipped, you can go in your ES Cloud console to Features > Create extension and upload your ZIP file.