Hi Johan, this is by design as MediaData implements ILocale (it is just a language property, defaulting to CultureInfo.InvariantCulture) but not ILocalizable. that is why media has no lang branches, and is synced to graph without a locale. that is why _metadata.locale / locales / fallbackForLocale are empty, and why locale: en leaves media out. ALL works only because it includes the language-neutral index.
To get pages and media in one SERP query, include NEUTRAL with the visitor's language => _Content(locale: [en, NEUTRAL], where: { }) { } or with the Graph SDK=> _graphContentClient.QueryContent<IContent>().SetLocale(currentCulture, QueryLocale.Neutral).
I tried this on CMS 13.5.1 (Alloy). Media count with locale: en: 0. With [en, NEUTRAL]: images and video and pdfs come back next to the en pages. note that content folders are also language neutral and will appear with NEUTRAL, so you'll probably want to filter them out of a SERP.
Media result will have empty locale, which is correct, since they apply to every language. If you need different files per language, you may create custom media type localizable (implement ILocalizable), and I think it will then be indexed per locale.
With Search & Navigation I see a EPiServer.Find.Cms.LanguagePublicationStatus value for media files where a language has been detected (I assume). I don't see any custom stuff around it.
I'm indexing just fine. Edit mode search works etc. Using 13.6.0 versions.
SERP needs to send locale but then no media items are included in the results.
A simple query to check with where results show all these three locale fields as empty:
{_Media(
locale: ALL
where: {
_assetMetadata: { mimeType: { eq: "application/pdf" } }
}) {
total(all: true)
items
{
_assetMetadata
{
mimeType
}
_metadata
{
locale
locales
fallbackForLocale
}
}
}
}