For a website I'm currently building I have a bunch of photos within an Assets folder (folder id of 5) that I have linked to "Photographer" entries within a "Photographers" structure.
I am now trying to search by the photographer slug in order to show photos for a specific photographer:
{% set searchQuery = "photographer::example-photographer" %}
{% set matchingPhotos = craft.assets.folderId(5).search(searchQuery) %}
Unfortunately however the matchingPhotos
data set is always empty, even though I'm very sure that a photographer exists with a slug of example-photographer
and there are photos linked to this photographer in the assets folder..
Is the way I'm trying to search correct?
Thanks!