Synonyms Files

Fusion collections are Solr collections which are managed by Fusion. Solr itself manages a set of resources for a collection. These resources include stopword lists and synonyms.

There are two ways of specifying synonyms: as a set of interchangeable tokens, or as a mapping from one token to one or more other tokens. A set of interchangeable tokens is specified as a series of comma-sperated words:

Television, Televisions, TV, TVs

This will be used to expand any document or query by expanding any single token in this set to all tokens in this set.

A mapping from one token to one or more other tokens is specified as follows:

pixima => pixma

In this case, tokens on the left hand side of the rule will be replaced by the tokens on the right hand side.

The "Configuration" section of the collection home panel contains options for managing each of these resources from inside Fusion.

You can view this file as a text file from the "Solr Config" panel:

#some test synonym mappings unlikely to appear in real input text
aaafoo => aaabar
bbbfoo => bbbfoo bbbbar
cccfoo => cccbar cccbaz
fooaaa,baraaa,bazaaa

# Some synonym groups specific to this example
GB,gib,gigabyte,gigabytes
MB,mib,megabyte,megabytes
Television, Televisions, TV, TVs
#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming
#after us won't split it into two words.

# Synonym mappings can be used for spelling correction too
pixima => pixma

Synonyms Manager

The Fusion UI provides a Synonyms manager tool which is reached from the "Synonyms" tab in the "Configuration" section of the collection home panel. Once opened, the Synonyms manager panel will display the synonyms.txt as a series of editable objects, 1 per line.

Synonyms Manager in the Fusion UI

Moving the cursor out of the editor field will add the item, clicking "Save" in the upper right corner will apply it to the current collection immediately, storing the config file in the correct Fusion folder. Choosing "Export" will download a copy via the browser to the local user computer. "Import and Save" reads a local file into Fusion.

An additional feature of the Synonym manager in the Fusion UI is that label terms can be used to restrict the display of synonyms to a browsable subset by adding a "category" label to the synonym set or mapping rule. This category label is a convenience for working with data in the Fusion UI only. The information is not saved in the synonyms file used by Solr.