Manage Synonyms

Synonyms are keywords with the same or similar meaning. All of them are located at System -> Search Management -> Manage Synonyms section.

You can either manually add synonyms, or import them from YAML-formatted file.

Adding New Synonym

  • Go to System -> Search Management -> Manage Synonyms grid and press Add New Synonym button.
  • On creation page, fill the following fields:
    • Term - is the base keyword, to which synonyms will be replaced.
    • Synonyms - comma-separated list of synonyms. It should contain at least one keyword. Each of them should match the following requirements:
      1. It should consist of one word, and only of alphanumeric characters (e. q. without spaces, dashes, slashes and so on).
      2. It should have length, greater than 1 character.
    • Store View - allows to select, where defined synonyms will be applied.
  • Save record.

Importing Synonyms

Our extension uses YAML file format for synonyms importing. It should resemble the following format:

    -
      term: [TERM_1]
      synonyms: [SYN_1]
    -
      term: [TERM_2]
      synonyms: [SYN_2]

Name of this file should be equal to your language code in capital case. Codes can be found here, use column 639-1 for that.

Example

Let's create a synonyms file for English locale. Name of such a file would be EN.yaml, and it's content should be:

    -
      term: abiogenesis
      synonyms: autogenesis,autogeny,spontaneous generation
    -
      term: abject
      synonyms: low,miserable,scummy,scurvy,resigned,unhopeful
    -
      term: abjection
      synonyms: abasement,degradation
    -
      term: abjectly
      synonyms: resignedly

To import synonyms, perform the following steps:

  • Place your custom YAML file to the special folder [magento_root]/var/sphinx/synonyms/
  • Go to System -> Search Management -> Manage Synonyms and press Import Synonyms button.
  • Dictionary field defines locale (language), to which synonyms are imported. All dictionaries should exist, and have at least one record, since imported data are appended to existing.
  • Store View defines storeviews, where imported synonyms will be applied.
  • Press Import to import and apply synonyms.