Skip to main content

Synonyms

This section allows you to manage synonyms. Synonyms help to expand the search. When the extension detects a synonym in a search query, it will perform searches for each synonym and display all relevant results.

To add or edit synonyms, navigate to System -> Search Management -> Manage Synonyms. The table below displays the list of created synonyms.

Audience settings

Custom synonyms list

The following fields available:

  • ID: ID of the item
  • Synonyms: list of synonyms group
  • Website: website where these synonyms will be implemented
  • Store View: select where defined synonyms will be applied
  • Action: actions on the selected emails in the queue:
    • Delete: delete synonyms group
    • View/Edit: allow see detailed information about synonyms group

Select Action -> View/Edit to view more details about the selected item.

Audience settings

Custom synonyms editing

You can edit next fields:

  • Scope: binds synonyms to a specific Website and Store View
  • Synonyms: a comma-separated list of synonyms. The terms entered (separated by commas) will be used as an OR search query across your entire store. For example, if you enter shoes,footwear, and the user searches for shoes, the search results will include any product or content containing either the term shoes or footwear
  • Merge existing synonyms: automatically merges synonyms into groups that share the same scope. If you check this box and add one or more of the same terms to different synonym groups within the same scope, it will automatically combine all those terms into one group. If you prefer not to merge them, uncheck the box, and an error will appear if you try to add the same terms
note

Search Ultimate does not keep synonyms in its own table. All synonym groups, including those added in this grid, imported from CSV, or created over REST, are stored in the native Magento table search_synonyms. The mst_search_synonym table is declared as disabled in the extension's database schema, so it is not created on your store and holds no data.


Manually adding synonyms​

To manually add synonyms, use the New synonyms group button located above the synonyms list.


Importing synonyms via CSV file​

This extension allows you to import synonym groups from a CSV file. The file name should correspond to your language code in uppercase letters. You can find the language codes here; refer to column 639-1. For example, use EN.csv as the file name. The CSV file must be saved in the [magento_root]/var/synonyms/ directory. Each synonym group should be placed on a new line.

EXAMPLE

Custom EN.csv file structure:

able,capable
ananas,pineapple
bodyguard,guard

To start the import process, click the Import Synonyms button above the synonyms list. This will open a window where you can specify the following parameters before beginning the import:

  • Dictionary: the CSV file containing the synonyms
  • Store View: the store view where the synonyms will be applied

After setting the parameters, click the Import button to start the import process.

note

Alternatively, you can initiate the import via CLI commands.


Managing synonyms over REST​

Synonym groups can also be created, updated, and deleted programmatically — see the Synonyms API.


Exporting synonyms for backup or migration​

There is no Export button for synonyms. To back up synonym groups or move them to another store, read them from the search_synonyms table. Each row holds one synonym group as a comma-separated list, which is the same format the CSV import uses.

For example, to save the synonyms of the store view with ID 1 into a file that can be imported later:

mysql -u <db_user> -p <db_name> -N -e "SELECT synonyms FROM search_synonyms WHERE store_id = 1" > var/synonyms/EN.csv
note

Synonym groups with the All Store Views scope have store_id = 0. If your database uses a table prefix, add it to the table name.

You can also read synonym groups with the GET /rest/V1/mst-search/synonyms request of the Synonyms API.