You are here

protected function SearchApiDbService::canDenormalize in Search API Database Search 7

Checks if a field can be denormalized.

List fields have multiple values, so cannot be denormalized. Text fields are tokenized into words, so cannot be denormalized either.

Parameters

array $field: Single field definition from SearchApiIndex::getFields().

Return value

bool TRUE if the field can be stored in a table with other fields (i.e., will only need a single row), FALSE otherwise.

2 calls to SearchApiDbService::canDenormalize()
SearchApiDbService::fieldsUpdated in ./service.inc
Overrides SearchApiAbstractService::fieldsUpdated().
SearchApiDbService::removeFieldStorage in ./service.inc
Drops a field's table or column for storage.

File

./service.inc, line 750
Contains SearchApiDbService.

Class

SearchApiDbService
Indexes and searches items using the database.

Code

protected function canDenormalize($field) {
  return !search_api_is_list_type($field['type']) && !search_api_is_text_type($field['type']);
}