lucene query bugfixing