From e43648f1fc48b6cda4d28e9f2e9d5981c67620a0 Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:18:55 -0600 Subject: [PATCH] fix indexing collections in elasticsearch --- CHANGELOG.md | 1 + ErsatzTV.Infrastructure/Search/ElasticSearchIndex.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 621af255a..5b6132168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix some sequential and scripted playout build failures when using playlists or marathons - Fix erasing playout items and history so all related data is also erased - This includes rerun history, unscheduled gaps, build status +- Fix indexing collections when using Elasticsearch backend ## [26.1.1] - 2026-01-08 ### Fixed diff --git a/ErsatzTV.Infrastructure/Search/ElasticSearchIndex.cs b/ErsatzTV.Infrastructure/Search/ElasticSearchIndex.cs index 7c79fc668..c15d00b9a 100644 --- a/ErsatzTV.Infrastructure/Search/ElasticSearchIndex.cs +++ b/ErsatzTV.Infrastructure/Search/ElasticSearchIndex.cs @@ -1011,6 +1011,8 @@ public class ElasticSearchIndex : ISearchIndex private static void AddCollections(ElasticSearchItem doc, IEnumerable collections) { + doc.Collection ??= []; + foreach (Collection collection in collections) { doc.Collection.Add(collection.Name);