You are here

public function SarniaSearchApiSolrField::isPossibleKey in Sarnia 7

Determine 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

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

Overrides SearchApiSolrField::isPossibleKey

File

./solr_field.inc, line 44

Class

SarniaSearchApiSolrField
Extend the logic around Solr field schema information.

Code

public function isPossibleKey() {
  return !$this
    ->getDynamicBase() && $this
    ->isStored() && !$this
    ->isMultivalued();
}