You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by Apache Wiki <wi...@apache.org> on 2007/05/15 15:48:51 UTC

[Jackrabbit Wiki] Update of "SynonymSearch" by MarcelReutegger

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The following page has been changed by MarcelReutegger:
http://wiki.apache.org/jackrabbit/SynonymSearch

New page:
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.

Example:

{{{
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/trunk/contrib/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"/>
}}}