can any one direct me on creating the custom synonyms using lucene in java?
Asked
Active
Viewed 1,534 times
1 Answers
2
If you use Solr, you can use a SynonymFilterFactory. Otherwise, Lucene In Action has an example of how to write a synonym filter if you want to do it in pure Lucene.

Xodarap
- 11,581
- 11
- 56
- 94
-
How do I convert the synonyms.dat file into lucene index for synonyms? The synonym.dat is simple text file having customs synonyms in it. All synonyms are comma separated and next set is followed in next line. – remo Jan 06 '11 at 15:58
-
@sharma: the format of the synonyms text file is given in the page I linked. – Xodarap Jan 06 '11 at 18:39
-
Xodarap - Will I be able to find the number of hits in a document using lucene? – remo Jan 06 '11 at 21:25
-
@sharma: yes, see [this question](http://stackoverflow.com/questions/1920726/get-search-word-hits-number-of-occurences-per-document-in-lucene). If you have additional questions, please ask them separately rather than as comments. – Xodarap Jan 06 '11 at 21:46