protected function SearchApiAttachmentsAlterSettings::getIndexableFileFields in Search API attachments 7
Retrieve list of fields, that should be indexed.
Return value
array Array of fields, ready to be indexed.
1 call to SearchApiAttachmentsAlterSettings::getIndexableFileFields()
- SearchApiAttachmentsAlterSettings::alterItems in includes/
callback_attachments_settings.inc - Alter items before indexing.
File
- includes/
callback_attachments_settings.inc, line 242 - Search API data alteration callback.
Class
- SearchApiAttachmentsAlterSettings
- Indexes files content.
Code
protected function getIndexableFileFields() {
$all_fields = $this
->getFileFields();
$index_fields = $this->index
->getFields();
$indexable = array();
foreach ($all_fields as $name => $field) {
// If field is not in the index, then it was not selected by the user,
// so we don't have to perform extraction of unnecessary files.
if (isset($index_fields["attachments_{$name}"])) {
$indexable[$name] = $field;
}
}
return $indexable;
}