I have an index consisting of several entities, such as:
- node
- taxonomy_term
- file
- user
When I don't have file on there attachements are correctly indexed on nodes once I add the relevant field from saa. Once I add files these vanish and I only get content in file entities (and I get it irrespective of whether I attached an saa field).
At first I presumed this was relevant to #2947469: can't add/search attachments when using Datasource: Multiple but that seems to apply to 7.x since this multiple data sources seems to work fine for me without this change, as long as file entities are not indexed
Attached is a patch which removes one conditional check which resolves my specific issue but this is possible not the best way to fix things, when file entities don't respect the field configuration.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2985617-2-remove-entity-check.patch | 1.24 KB | grahl |
Comments
Comment #2
grahlComment #3
grahlOne small addendum: In my index there are several saa fields since multiple attachements fields across entities are indexed. However, I'm seeing with this patch now that the content is added to all saa_ fields, not just the one containing the content. This could be an unrelated issue or a regression, I didn not investigate further.
Comment #4
izus commentedactually i think it's a duplicate of https://www.drupal.org/project/search_api_attachments/issues/2947469 that is for drupal 8
please feel free to reopen if you think it's not
Comment #5
grahlThanks for your feedback, I'm fine with keeping this as closed duplicate especially because the fix in that issue might also resolve the issue I encountered.
However, when testing that patch it might be useful to pay particular attention to file entities since at least in our site the multiple datasources index did not start misbehaving for me until that particular entity type was involved.