3 Replies Latest reply on Jan 15, 2013 2:00 AM by Nicklas Karlsson

    How to use SynonymsFactory in Hibernate Search?

    Sam W Expert

      Hi, I am using Jboss7.1.1.Final and Hibernate Lucene search 3.5 in my ejb module.

      I want to use Synonyms search, I found Hibernate Lucene Search has a built-in SynonymsFactory class can be used:



      @TokenFilterDef(factory = SynonymFilterFactory.class, params = {@Parameter(name = "ignoreCase", value = "true"),
            @Parameter(name = "expand", value = "true"),@Parameter(name = "synonyms", value = "lucene-syn.properties") }),


      The problem is the SynonymsFactory require an external synonyms file.  But where to get a generic synonyms text file used with Lucuene SynonymsFactory?

      I 've been searching for a whole day and couldn't found a generic synonyms file available for download.

      I thought Lucene search should include a generic sysnonyms file for the SysnonymsFActory, but I could be wrong. As I am not able to found th is information from google search.


      Any help is very appreciated.