fix search lucene migration on oracle
replace hardcoded SQL with placeholder