Specify search mode during code generation