lucene query bug fix