You are here

public function SearchApiSolrField::isPossibleKey in Search API Solr 7

Determines whether this field may be suitable for use as a key field.

Unfortunately, it seems like the best way to find an actual uniqueKey field according to Solr is to examine the Solr core's schema.xml.

Return value

bool Whether the field is suitable for use as a key.

File

includes/solr_field.inc, line 114

Class

SearchApiSolrField
Logic around Solr field schema information.

Code

public function isPossibleKey() {
  return !$this
    ->getDynamicBase() && !in_array($this
    ->getType(), array(
    'boolean',
    'date',
    'text',
  )) && $this
    ->isStored() && !$this
    ->isMultivalued();
}