Updated code to Optimize search module

Added by Tarun Patel