You are here

public function SearchApiSolrConnection::getFields in Search API Solr 7

Get metadata about fields in the Solr/Lucene index.

Parameters

int $num_terms: Number of 'top terms' to return.

Return value

array An array of SearchApiSolrField objects.

Overrides SearchApiSolrConnectionInterface::getFields

File

includes/solr_connection.inc, line 368

Class

SearchApiSolrConnection
Represents a Solr server resource.

Code

public function getFields($num_terms = 0) {
  $fields = array();
  $luke_data = $this
    ->getLuke($num_terms);
  if (isset($luke_data->fields)) {
    foreach ($luke_data->fields as $name => $info) {
      $fields[$name] = new SearchApiSolrField($info);
    }
  }
  return $fields;
}