See the instructions on the Lucene wiki.