query argument within SearchAttachments.php was added a long time ago to prevent some compatibility issues as post processing was called separately for indexed queries. This is now not the case and should be removed.
It causes image parsing as well as advanced meta fields not to follow up. Other than a quick fix a new hierarchy should be added so that there is a separate index table search class for media files.
[ ] Move the postProcess function from the SearchAttachments to a Trait
[ ] Rename SearchAttachments to SearchMedia using the Trait
The
query argument within SearchAttachments.php was added a long time ago to prevent some compatibility issues as post processing was called separately for indexed queries. This is now not the case and should be removed.
It causes image parsing as well as advanced meta fields not to follow up. Other than a quick fix a new hierarchy should be added so that there is a separate index table search class for media files.
SearchAttachments
to a TraitSearchAttachments
toSearchMedia
using the TraitSearchMediaIndex
using the TraitSearchQuery.php