You are here

public function SolrFieldDefinitionInterface::isSortable in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/TypedData/SolrFieldDefinitionInterface.php \Drupal\search_api_solr\TypedData\SolrFieldDefinitionInterface::isSortable()
  2. 8.2 src/TypedData/SolrFieldDefinitionInterface.php \Drupal\search_api_solr\TypedData\SolrFieldDefinitionInterface::isSortable()

Determine whether a field is suitable for sorting.

In order for a field to yield useful sorted results in Solr, it must be indexed and not multivalued. If a sort field is tokenized, the tokenization must yield only one token; multiple tokens can result in unpredictable sort ordering. Unfortunately, there's no way to check whether a particular field contains values with multiple tokens.

Return value

bool Whether the field might be suitable for sorting.

1 method overrides SolrFieldDefinitionInterface::isSortable()
SolrFieldDefinition::isSortable in src/TypedData/SolrFieldDefinition.php
Determine whether a field is suitable for sorting.

File

src/TypedData/SolrFieldDefinitionInterface.php, line 159

Class

SolrFieldDefinitionInterface
Defines an interface for Solr field definitions.

Namespace

Drupal\search_api_solr\TypedData

Code

public function isSortable();