Searching with synonyms is integrated in the
jcr:contains() function and uses the same syntax like synonym searches with Google. If a search term is prefixed with
~ also synonyms of the search term are considered.
This feature is disabled per default and you need to add a configuration parameter to the SearchIndex element in your workspace.xml and repository.xml file to enable it. The Jackrabbit core does not include an implementation for a SynonymProvider but you may build one from the contribution section. See http://svn.apache.org/repos/asf/jackrabbit/sandbox/wordnet-synonyms/README.txt for instructions how to build the jar file. Once you have done that you can enable the synonym provider: