Lucene Comparsion, dirty code