GCP-5965 added checker if q is empty string, to not waste compute cycles when search query is empty
GCP-5965