Friday, October 03, 2008 | 11:26 AM
Victor Wang and Bartlomiej Niechwiej, Software Engineers
With our launch of Google Site Search, we added a new feature to the Custom Search platform: custom synonyms. Here's how this feature can be used to improve the quality of your Custom Search Engine (CSE).
How can custom synonyms help?
Synonyms help by finding documents with relevant related terms and ranking them higher. Synonyms can help to alleviate the mismatch that often occurs between the queries that users type, and the actual words, phrases and concepts used in the documents being searched. Custom Search, of course, automatically takes advantage of synonyms used in Google Web search. In addition, Custom Search goes one step further: we allow you to explicitly define custom synonyms that are specific to your web site, community or topic of interest.
To illustrate situations where CSE custom synonyms can help, we created 2 CSEs that both search content from the Palo Alto Medical Foundation (PAMF). The first CSE does not have custom synonyms enabled, while the second CSE has a few custom synonyms enabled:
Acronyms: Acronyms often stand for different terms in different contexts. This is especially true within organizations, where acronyms are used frequently. In such cases, it may be possible to improve retrieval via the use of synonyms. Thus, "PAMF" refers to "Palo Alto Medical Foundation", and adding this synonym improves search results: searching for "PAMF" without synonyms gives only a few relevant results, while the CSE with the synonym returns more relevant results.
Community: Within specific target user communities, words or phrases have different usage and significance. When a patient is looking for "hearing doctor", adding the synonym "audiologist" to the CSE provides much better results while the results in the CSE without synonyms are not optimal. Conversely, if a doctor is searching for "somnambulism", she finds no results at all in the CSE without synonyms, but much better results via addition of the synonym "sleepwalking" to the CSE. Synonyms can therefore be used to improve the experience of specific classes of users of a web site.
How can I add synonyms to my Custom Search Engine?
The CSE administrator can control the set of synonyms used by uploading a synonym dictionary that is specific to the domain and website. The synonym dictionary can include alternate words or phrases for common search queries. The following steps show how to add the synonyms for the Palo Alto Medical Foundation CSE.
- Download the existing CSE context file through "Control panel"->Advanced->"Download context"
- Add custom synonyms to your search engine. The synonym dictionary is uploaded as part of the context XML file. Here are the synonyms we added for the above examples:
<synonymentry word="hearing doctor">
<synonym>Palo Alto Medical Foundation</synonym>
- Upload the context file through "Control panel"->Advanced->"Upload context"
A few notes:
- CSE synonyms are unidirectional, not bidirectional. Thus, a context file with
<synonymentry word="migraine"><synonym>headache</synonym></synonymentry>defines "headache" to be a synonym for "migraine". However, if you also want "migraine" to be considered as a synonym for "headache", you need to add a separate SynonymEntry to the XML, as follows:
- In the current version, the synonym dictionary can only be uploaded/downloaded as a part of the context XML file. We hope to make this much easier in the future.
- We allow up to 500 individual synonyms for a given CSE.
- Each word can have no more than 10 synonyms. If there multiple synonyms, the query will be expanded to include all synonyms uniformly.
If you are using custom synonyms in your CSE, we hope to get feedback from you about what improvements we can make.