Extract minimal search terms
Made choice for case insensitive search depend on the database type using the production env variables