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.
- Go to System -> Search Management -> Manage Synonyms grid and press Add New Synonym button.
On creation page, fill the following fields:
- Term - is the keyword, which customer could enter to the search box, and which will be replaced with keyword
Synonyms - comma-separated list of synonyms. It should contain at least one keyword. Each of them should match the following requirements:
- It should consist of one word, and only of alphanumeric characters (e. q. without spaces, dashes, slashes and so on).
It should have length, greater than 1 character.
- Max length of synonyms list equals 255 symbols.
- Store View - allows to select, where defined synonyms will be applied.
- Save record.
ExampleAssume, that we have on our stores a set of watches, and need them to be found on "clock" keyword. So we setup Synonym as:
Term: clock Synonyms: watch
Then, if customer issues "clock" query, all watches will be found.
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.
ExampleLet'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
- 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.