Synonyms#
Profiles: Project Creator
You can harness the power of synonyms using the Squirro UI to make your project search experience even more powerful.
This page explains how project creators can use synonyms to improve search results.
Populating Synonym Content#
All projects include a default synonyms list named Synonyms for Title, Body & Abstract. By default, this list is empty.
To enable synonyms search within project content (title
, body
& summary
fields) of Squirro items, you must populate this default list with your synonyms.
To add or edit synonym content to this list, follow the steps below:
Open your project and navigate to the Setup space.
Click the Data tab, then Synonyms, as shown in the example screenshot below:
Hover over the list and click Edit. This will open the Edit Synonyms page shown below:
Here, you can either specify all synonyms in the Synonyms List input text box, with one synonyms list per line, or you can drag and drop a synonyms file in the same format as explained above to the drag & drop zone to automatically fill the text field.
Click Update to save your changes.
Note: Linking from this default synonyms list to the content of Squirro items is automatic, occurring during project creation. This linking cannot be modified in the UI.
Solr Synonyms Syntax#
The syntax of the synonyms file follows the Solr Synonyms Syntax.
A brief description of the Solr format is shown below from the Elasticsearch docs:
# Blank lines and lines starting with pound are comments.
# Explicit mappings match any token sequence on the LHS of "=>"
# and replace with all alternatives on the RHS. These types of mappings
# ignore the expand parameter in the schema.
# Examples:
i-pod, i pod => ipod,
sea biscuit, sea biscit => seabiscuit
# Equivalent synonyms may be separated with commas and give
# no explicit mapping. In this case the mapping behavior will
# be taken from the expand parameter in the schema. This allows
# the same synonym file to be used in different synonym handling strategies.
# Examples:
ipod, i-pod, i pod
foozball , foosball
universe , cosmos
lol, laughing out loud
# If expand==true, "ipod, i-pod, i pod" is equivalent
# to the explicit mapping:
ipod, i-pod, i pod => ipod, i-pod, i pod
# If expand==false, "ipod, i-pod, i pod" is equivalent
# to the explicit mapping:
ipod, i-pod, i pod => ipod
# Multiple synonym mapping entries are merged.
foo => foo bar
foo => baz
# is equivalent to
foo => foo bar, baz
Note: Squirro supports the full synonyms syntax including multi-word synonyms and contractions.
Synonym Labels Setup#
To configure a synonyms list to be used with a certain label, follow the steps below:
Open your project and navigate to the Setup space.
Click the Data tab, then Synonyms.
Click the plus icon to create a new synonym list.
Populate the list and click Update.
Navigate to Setup → Data → Labels.
Hover over the label you want to configure and click Edit, as shown in the example screenshot below:
From the dropdown menu, select the synonym list you want to use for this label as shown in the example screenshot below:
Click Update.
Now, the mapped synonym list will be used by default when searching using this particular label.
Note
Synonyms list mapping is only available for string
type synonyms and is not available for other types of labels like bool
, int
, or float
.
Deletion of Synonyms Lists#
Synonyms lists can be deleted using the delete button on the synonyms list management screen as shown below:
Caution: Squirro does not allow deletion of synonyms list which are currently in use by a label or by the Squirro content fields. To delete such synonyms, you will first have to un-map them from the corresponding label (in the label edit menu) before proceeding to delete such synonyms list.