Written search query using stringbuffer.