sample code for Lucene.