search command optimized