Moved Lucene query generation to the server