Hi!
In the project I am working with there are several sites with each site having a search page that is only listing hits belonging to the site.
I am doing a UnifiedSearch. The part with listing pages belonging to the site is no problem. I am just checking the ancestors. But how do I do it with MediaData? I only want to list medias that are being used in a page belonging to the site. Here the ancestor field is only listing the content folders, not the pages (or blocks).
I have actually solved it by implementing a property listing all pages the media is referenced in. But the problem is how to reindex the medias when a page is adding or removing the media.
Any nice ideas how to perform the search?