Change query that using regex to able it to use indexes