The command-line synonym tool reads your specified synonym input file to set the synonyms for an index. Within the input file, define the words or phrases that are to be synonyms in groups. Each synonym in a group is a synonym for every other synonym in the same group. The order of the synonyms within a group has no significance.
A synonym file has the following XML format:
<?xml version="1.0" encoding="UTF-8"?> <synonymgroups version="1.0"> <synonymgroup> <synonym>phrase..1</synonym> <synonym>phrase..2</synonym> <synonym>phrase..n</synonym> </synonymgroup> </synonymgroups>
Example:
<?xml version="1.0" encoding="UTF-8"?> <synonymgroups version="1.0"> <synonymgroup> <synonym>ball</synonym> <synonym>globe</synonym> <synonym>sphere</synonym> <synonym>orb</synonym> </synonymgroup> <synonymgroup> <synonym>International Business Machines</synonym> <synonym>ibm</synonym> </synonymgroup> </synonymgroups>
Two synonym groups are defined in this example. In the last group, International Business Machines is defined as a synonym for ibm and vice versa.