From my Enterprise Lucene/Solr Book: lucene-basics project