[Refactoring] Replace bare search flags to descriptive enum names

This is a spin-off changes from #2256.