Function createTerminalSearchFactory