ssr search function