Add code to handle limit in search command