I have deployed my Elasticsearch server to the cloud: cloud.elastic.co
I have seen stopwords and synonyms documentation, which explain stopwords.txt/synonyms.txt files could be copied under config folder... but how can I do this on a cloud server?
I know I can pass the stopwords in an array, but using a file, it would be easier to update them:
Updating stopwords is easier if you specify them in a file with the stopwords_path parameter. You can just update the file (on every node in the cluster) and then force the analyzers to be re-created by either of these actions
You have to use Custom Plugins section to manage any custom plugins, scripts or dictionaries (stopwords, synonymns, etc.) Steps:
Create a zip file with the following directory structure:
.
|__ dictionaries
|__ stopwords.txt
Login to elastic cloud and go to Custom Plugins section
Click on Add Plugin
Fill in the relevant details and for the section Plugin Type select A bundle containing a dictionary or script
Click on Create Plugin
Go back to the Custom plugins page and click on the new plugin you just added.
Scroll to the bottom and upload the zip file created in first step.
Now you have to update your cluster so that its available to all the nodes. To do this follow the steps below:
Wait for the update activity to complete. Once completed you can now use stopwords.txt as below:
"stopwords_path": "stopwords.txt"
Here is the complete elastic cloud documentation. Documentation page for adding plugin/script/dictionary is here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With