Made compatible with lucene 4.4