Search Lucene: fix undefined variable
Search Lucene: fix depricated function warning