if value is a list, generates terms filter