Apply autocomplete distinct for name and label search.