You are here

public function Apache_Solr_Service::setNamedListTreatmet in Apache Solr Search 5

Set how NamedLists should be formatted in the response data. This mainly effects the facet counts format.

Parameters

string $namedListTreatment:

Throws

Exception If invalid option is set

File

SolrPhpClient/Apache/Solr/Service.php, line 463

Class

Apache_Solr_Service
Starting point for the Solr API. Represents a Solr server resource and has methods for pinging, adding, deleting, committing, optimizing and searching.

Code

public function setNamedListTreatmet($namedListTreatment) {
  switch ((string) $namedListTreatment) {
    case Apache_Solr_Service::NAMED_LIST_FLAT:
      $this->_namedListTreatment = Apache_Solr_Service::NAMED_LIST_FLAT;
      break;
    case Apache_Solr_Service::NAMED_LIST_MAP:
      $this->_namedListTreatment = Apache_Solr_Service::NAMED_LIST_MAP;
      break;
    default:
      throw new Exception('Not a valid named list treatement option');
  }
}