This will prevent unnecessary threads from being spawned, if the query does not start with the given string.