Differences between revisions 2 and 3
Revision 2 as of 2008-03-17 19:13:33
Size: 980
Editor: 65
Comment: fix url for readme
Revision 3 as of 2009-09-20 23:45:27
Size: 980
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

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.


SQL: select * from nt:resource where contains(., '~food')

XPath: //element(*, nt:resource)[jcr:contains(., '~food')

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:

   <param name="synonymProviderClass" value="org.apache.jackrabbit.core.query.wordnet.WordNetSynonyms"/>

SynonymSearch (last edited 2009-09-20 23:45:27 by localhost)