Search Engine Debug (Version 3)

This is a self-executing function for a search engine. It validates
search queries and displays appropriate messages depending on the
results.