1. Go to this page and download the library: Download intracto/elastic-synonym library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
intracto / elastic-synonym example snippets
'my_synonyms' => [ // a name for your filter
'type' => 'synonym_graph',
'synonyms_path' => 'analytics/synonyms.txt', // This needs to be the path inside /etc/elastic.
'updateable' => true, // *must* be true
],