protected static function Database::getTextFieldName in Search API 8
Trims long field names to fit into the text table's field_name column.
Parameters
string $name: The field name.
Return value
string The field name as stored in the field_name column.
2 calls to Database::getTextFieldName()
- Database::getFacets in modules/
search_api_db/ src/ Plugin/ search_api/ backend/ Database.php  - Computes facets for a search query.
 - Database::indexItem in modules/
search_api_db/ src/ Plugin/ search_api/ backend/ Database.php  - Indexes a single item on the specified index.
 
File
- modules/
search_api_db/ src/ Plugin/ search_api/ backend/ Database.php, line 1433  
Class
- Database
 - Indexes and searches items using the database.
 
Namespace
Drupal\search_api_db\Plugin\search_api\backendCode
protected static function getTextFieldName($name) {
  if (strlen($name) > 191) {
    // Replace long field names with something unique and predictable.
    return Crypt::hashBase64($name);
  }
  else {
    return $name;
  }
}