public function SearchApiQuery::fields in Search API 7
Overrides SearchApiQueryInterface::fields
File
- includes/
query.inc, line 569 - Contains SearchApiQueryInterface and SearchApiQuery.
Class
- SearchApiQuery
- Provides a standard implementation of the SearchApiQueryInterface.
Code
public function fields(array $fields) {
$fulltext_fields = $this->index
->getFulltextFields();
foreach (array_diff($fields, $fulltext_fields) as $field) {
throw new SearchApiException(t('Trying to search on field @field which is no indexed fulltext field.', array(
'@field' => $field,
)));
}
$this->fields = $fields;
return $this;
}