make lucene replacement pattern as global variable