- πΊπΈUnited States Arlina
Here's a patch for 9.0.x that provides an extensible way to support other field types. It adds two new hooks:
- hook_search_api_attachments_get_file_fields(): determine if a given field is of interest to search_api_attachments (make it selectable in the search index "add fields" configuration).
- hook_search_api_attachments_add_field_values(): allows modules to add file entity IDs to the search index, given a field type, field name, and entity.
In my scenario, I had a custom field that extended a field reference field, and the code needed to make it work with search_api_attachments is essentially what was added in the hooks description under search_api_attachments.api.php.