public function SolrFieldDefinition::isPossibleKey in Search API Solr 8.2
Same name and namespace in other branches
- 8.3 src/TypedData/SolrFieldDefinition.php \Drupal\search_api_solr\TypedData\SolrFieldDefinition::isPossibleKey()
- 4.x src/TypedData/SolrFieldDefinition.php \Drupal\search_api_solr\TypedData\SolrFieldDefinition::isPossibleKey()
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
bool Whether the field is suitable for use as a key.
Overrides SolrFieldDefinitionInterface::isPossibleKey
File
- src/
TypedData/ SolrFieldDefinition.php, line 194
Class
- SolrFieldDefinition
- Defines a class for Solr field definitions.
Namespace
Drupal\search_api_solr\TypedDataCode
public function isPossibleKey() {
return !$this
->getDynamicBase() && $this
->isStored() && !$this
->isMultivalued();
}