Adding files as entities to be indexed prevents nodes/medias to show up in results

Created on 18 April 2019, over 5 years ago
Updated 20 November 2024, about 1 month ago

If you add Files entity type to index (in index edit tab), nodes/medias referencing to files (file field or entity_reference field) will not include them in fulltext index even if you add the corresponding file or entity_reference as General>Search attachment field (in index fields tab).

This happens because plugin/search_api/processor/FilesExtractor addFieldValues() breaks the foreach fields as soon as it meets the possible saa_file_entity for an entity. In fact, this always happens from getFileFieldsAndFileEntityItems() if entity:file are in datasources.

First option is not to index files (they will be included through other entities refering to them).

It looks like second option is to change "break" with "continue" in addFieldValues (see attached patch).

Does it look OK or are we making an overload with this ?

If first option is the one to go, I wish I had read it in README.

Thanks

🐛 Bug report
Status

Closed: cannot reproduce

Version

1.0

Component

Code

Created by

🇧🇪Belgium f2boot

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024