Quick search function optimization.