Lucene 5.0 compatibility

Change-Id: I61d6f0f1378aa4e3955975b4b37fc39a758de909