Seacrh redone using db instead of plain ruby