You are here

public function SearchApiSolrDocument::getField in Search API Solr 7

Gets information about a field stored in Solr.

Parameters

string $key: The name of the field.

Return value

array|false An associative array of info if the field exists, FALSE otherwise.

File

includes/document.inc, line 209

Class

SearchApiSolrDocument
Holds Key / Value pairs that represent a Solr Document along with any associated boost values. Field values can be accessed by direct dereferencing such as:

Code

public function getField($key) {
  if (isset($this->fields[$key])) {
    return array(
      'name' => $key,
      'value' => $this->fields[$key],
      'boost' => $this
        ->getFieldBoost($key),
    );
  }
  return FALSE;
}