lucene refactor