Quantum search with prior knowledge